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