chore: standardize popd calls
This commit is contained in:
2
.github/commands/bump-azure
vendored
2
.github/commands/bump-azure
vendored
@@ -45,7 +45,7 @@ main() {
|
|||||||
echo "=====> Creating upstream pull request"
|
echo "=====> Creating upstream pull request"
|
||||||
../$GH_FOLDER/bin/gh pr create --head dokku:dokku-$VERSION --repo Azure/azure-quickstart-templates --title 'Update dokku-vm dokku version to 0.23.7' --body ''
|
../$GH_FOLDER/bin/gh pr create --head dokku:dokku-$VERSION --repo Azure/azure-quickstart-templates --title 'Update dokku-vm dokku version to 0.23.7' --body ''
|
||||||
|
|
||||||
popd >/dev/null
|
popd &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
2
.github/commands/ci-run
vendored
2
.github/commands/ci-run
vendored
@@ -7,7 +7,7 @@ main() {
|
|||||||
mkdir -p test-results/bats
|
mkdir -p test-results/bats
|
||||||
pushd tests/unit >/dev/null
|
pushd tests/unit >/dev/null
|
||||||
bats --report-formatter junit --output ../../test-results/bats "$FILE_NAME.bats"
|
bats --report-formatter junit --output ../../test-results/bats "$FILE_NAME.bats"
|
||||||
popd >/dev/null
|
popd &>/dev/null
|
||||||
|
|
||||||
ls -lah test-results/bats
|
ls -lah test-results/bats
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1284,7 +1284,7 @@ REV="$3" # optional, may not be sent for tar-based builds
|
|||||||
pushd "$TMP_WORK_DIR" >/dev/null
|
pushd "$TMP_WORK_DIR" >/dev/null
|
||||||
touch Procfile
|
touch Procfile
|
||||||
echo "clock: some-command" >> Procfile
|
echo "clock: some-command" >> Procfile
|
||||||
popd >/dev/null
|
popd &>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
### `post-proxy-ports-update`
|
### `post-proxy-ports-update`
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ trigger-builder-herokuish-post-app-clone-setup() {
|
|||||||
|
|
||||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||||
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
|
|
||||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ trigger-builder-herokuish-post-app-clone-setup() {
|
|||||||
|
|
||||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||||
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-herokuish-post-app-clone-setup "$@"
|
trigger-builder-herokuish-post-app-clone-setup "$@"
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ fn-git-cmd() {
|
|||||||
pushd "$GIT_DIR" >/dev/null
|
pushd "$GIT_DIR" >/dev/null
|
||||||
git "$@"
|
git "$@"
|
||||||
exit_code="$?"
|
exit_code="$?"
|
||||||
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
return $exit_code
|
return $exit_code
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ fn-git-setup-build-dir-submodules() {
|
|||||||
if [[ "$DOKKU_KEEP_GIT_DIR" != "true" ]]; then
|
if [[ "$DOKKU_KEEP_GIT_DIR" != "true" ]]; then
|
||||||
pushd "$GIT_WORKDIR" >/dev/null
|
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
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user