fix: avoid popd errors when dokku is run as root

When running the dokku command in a directory that the dokku user does not have access to - such as /root - popd will fail loudly (starting in Ubuntu 16.04). This change ignores those errors and changes the working dir in the bin to /tmp.

Refs #5012
This commit is contained in:
Jose Diaz-Gonzalez
2022-01-27 22:14:14 -05:00
parent faf204c03a
commit b0faf2e1f2
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ trigger-builder-dockerfile-core-post-extract() {
fi
mv "$NEW_DOCKERFILE" Dockerfile
popd &>/dev/null
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-builder-dockerfile-core-post-extract "$@"

View File

@@ -24,7 +24,7 @@ trigger-builder-pack-core-post-extract() {
if [[ "$NEW_PROJECT_TOML" != "project.toml" ]]; then
mv "$NEW_PROJECT_TOML" project.toml
fi
popd &>/dev/null
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-builder-pack-core-post-extract "$@"