fix: properly quote traps with variables

This commit is contained in:
Jose Diaz-Gonzalez
2021-06-09 01:17:48 -04:00
parent 5fdae7dc1e
commit b16e5516bf
4 changed files with 4 additions and 4 deletions

View File

@@ -391,7 +391,7 @@ fn-git-clone() {
fi
dokku_log_info1_quiet "Cloning $APP from $GIT_REMOTE#$GIT_REF"
trap 'rm -rf $APP_CLONE_ROOT > /dev/null' RETURN INT TERM EXIT
trap "rm -rf '$APP_CLONE_ROOT' > /dev/null" RETURN INT TERM EXIT
is_ref=true
if GIT_TERMINAL_PROMPT=0 git clone --depth 1 -n --branch "$GIT_REF" "$GIT_REMOTE" "$APP_CLONE_ROOT" 2>/dev/null; then

View File

@@ -144,7 +144,7 @@ trigger-scheduler-docker-local-scheduler-deploy() {
}
# run checks first, then post-deploy hooks, which switches proxy traffic
trap 'kill_new $cid $PROC_TYPE $CONTAINER_INDEX' INT TERM EXIT
trap "kill_new $cid $PROC_TYPE $CONTAINER_INDEX" INT TERM EXIT
if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "false" ]]; then
dokku_log_info1 "Attempting pre-flight checks ($PROC_TYPE.$CONTAINER_INDEX)"
plugn trigger check-deploy "$APP" "$cid" "$PROC_TYPE" "$port" "$ipaddr"