From 9d504fe93a3f486c1e55df1ba8edbcfcc7b38118 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Tue, 21 Apr 2015 21:36:03 -0700 Subject: [PATCH] make sure we cleanup tmp. logging when we hit edge cases --- plugins/ps/functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/ps/functions b/plugins/ps/functions index cf0eff73a..e17233023 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -28,7 +28,7 @@ generate_scale_file() { copy_from_image "$IMAGE" "/app/DOKKU_SCALE" "$DOKKU_ROOT/$APP" 2>/dev/null || dokku_log_info1_quiet "DOKKU_SCALE not found in app image" if [[ ! -f $DOKKU_SCALE_FILE ]]; then local TMP_WORK_DIR=$(mktemp --tmpdir=/tmp -d DOKKU_SCALE.XXXXX) - trap 'rm -rf $TMP_WORK_DIR' EXIT + trap 'rm -rf $TMP_WORK_DIR' INT TERM EXIT RETURN if is_image_buildstep_based "$IMAGE"; then @@ -40,9 +40,11 @@ generate_scale_file() { elif [[ -f $TMP_WORK_DIR/.release ]];then local PROCFILE="$TMP_WORK_DIR/.release" else + dokku_log_info1 "No Procfile or .release file found. Defaulting to a single web process" echo "web=1" >> $DOKKU_SCALE_FILE fi else + dokku_log_info1 "Dockerfile build detected. Defaulting to a single web process" echo "web=1" >> $DOKKU_SCALE_FILE fi