mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
fix: popd out of tmp directory after a git push-based deployment
Without this, we end up with PWD issues as the tmp directory is removed automatically after a build. Closes #6771
This commit is contained in:
@@ -15,7 +15,7 @@ git_build_app_repo() {
|
||||
|
||||
# clean up after ourselves
|
||||
local GIT_BUILD_APP_REPO_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$GIT_BUILD_APP_REPO_TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
trap "popd &>/dev/null || true; rm -rf '$GIT_BUILD_APP_REPO_TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
chmod 755 "$GIT_BUILD_APP_REPO_TMP_WORK_DIR"
|
||||
unset GIT_DIR GIT_QUARANTINE_PATH GIT_WORK_TREE
|
||||
|
||||
Reference in New Issue
Block a user