chore: standardize popd calls

This commit is contained in:
Jose Diaz-Gonzalez
2021-03-01 00:30:34 -05:00
parent 3254c52d7c
commit 5804cd11bc
6 changed files with 7 additions and 7 deletions

View File

@@ -245,7 +245,7 @@ fn-git-cmd() {
pushd "$GIT_DIR" >/dev/null
git "$@"
exit_code="$?"
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
popd &>/dev/null || pushd "/tmp" >/dev/null
return $exit_code
}
@@ -383,7 +383,7 @@ fn-git-setup-build-dir-submodules() {
if [[ "$DOKKU_KEEP_GIT_DIR" != "true" ]]; then
pushd "$GIT_WORKDIR" >/dev/null
find "$GIT_WORKDIR" -name .git -prune -exec rm -rf {} \; >/dev/null
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
popd &>/dev/null || pushd "/tmp" >/dev/null
fi
}