Skip to content

Commit

Permalink
fix: respect the TMPDIR environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed May 15, 2020
1 parent d7ed80f commit 5fd0ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ service_backup() {
dokku_log_fail "Provide AWS credentials or use the --use-iam flag"
fi

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

docker inspect "$ID" &>/dev/null || dokku_log_fail "Service container does not exist"
Expand Down
2 changes: 1 addition & 1 deletion help-functions
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn-help-contents() {

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

0 comments on commit 5fd0ca4

Please sign in to comment.