Skip to content

Commit 5fd0ca4

Browse files
committed
fix: respect the TMPDIR environment variable
Refs dokku/dokku-redis#143
1 parent d7ed80f commit 5fd0ca4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common-functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ service_backup() {
188188
dokku_log_fail "Provide AWS credentials or use the --use-iam flag"
189189
fi
190190

191-
TMPDIR=$(mktemp -d)
191+
TMPDIR=$(mktemp -d --tmpdir)
192192
trap 'rm -rf "$TMPDIR" > /dev/null' RETURN INT TERM EXIT
193193

194194
docker inspect "$ID" &>/dev/null || dokku_log_fail "Service container does not exist"

help-functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn-help-contents() {
7676

7777
fn-help-contents-subcommand() {
7878
declare SUBCOMMAND="$1" FULL_OUTPUT="$2"
79-
local TMPDIR=$(mktemp -d)
79+
local TMPDIR=$(mktemp -d --tmpdir)
8080
local UNCLEAN_FILE="${TMPDIR}/cmd-unclean" CLEAN_FILE="${TMPDIR}/cmd-clean"
8181
local BOLD CMD_OUTPUT CYAN EXAMPLE LIGHT_GRAY NORMAL
8282
trap 'rm -rf "$TMPDIR" > /dev/null' RETURN INT TERM EXIT

0 commit comments

Comments
 (0)