fix: properly handle directory change when cleaning .git directory
Closes #4434
This commit is contained in:
1 parent
859ea13b0a
commit
6b90dc70b1
1 file changed
+2
@@ -322,7 +322,9 @@ fn-git-setup-build-dir-submodules() {
|
|||||||
|
|
||||||
suppress_output env -u GIT_QUARANTINE_PATH git -C "$GIT_WORKDIR" submodule update --init --recursive
|
suppress_output env -u GIT_QUARANTINE_PATH git -C "$GIT_WORKDIR" submodule update --init --recursive
|
||||||
if [[ "$DOKKU_KEEP_GIT_DIR" != "true" ]]; then
|
if [[ "$DOKKU_KEEP_GIT_DIR" != "true" ]]; then
|
||||||
|
pushd "$GIT_WORKDIR" >/dev/null
|
||||||
find "$GIT_WORKDIR" -name .git -prune -exec rm -rf {} \; >/dev/null
|
find "$GIT_WORKDIR" -name .git -prune -exec rm -rf {} \; >/dev/null
|
||||||
|
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user