diff --git a/plugins/git/functions b/plugins/git/functions index d5a972c70..37eeea70b 100755 --- a/plugins/git/functions +++ b/plugins/git/functions @@ -37,7 +37,9 @@ git_build_app_repo() { if use_git_worktree; then # git worktree - this method uses git worktree which was introduced in git 2.5 + pushd "$DOKKU_ROOT/$APP" > /dev/null git worktree add "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" > /dev/null + popd > /dev/null pushd "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null else # git clone - this method creates a new git repository and adds the primary