Merge pull request #2895 from dokku/2864-git-rebuild-in-dir

fix: Change to app directory when calling git worktree add
This commit is contained in:
Jose Diaz-Gonzalez
2017-09-02 14:33:08 -04:00
committed by GitHub

View File

@@ -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