From 5fd0ca4be797faa6b004e584c9cf3540933cd52a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 15 May 2020 00:56:54 -0400 Subject: [PATCH] fix: respect the TMPDIR environment variable Refs dokku/dokku-redis#143 --- common-functions | 2 +- help-functions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common-functions b/common-functions index 286d484..6840b12 100755 --- a/common-functions +++ b/common-functions @@ -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" diff --git a/help-functions b/help-functions index aa662c8..2bc59af 100755 --- a/help-functions +++ b/help-functions @@ -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