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:
1 parent
faf204c03a
commit
b0faf2e1f2
2 files changed
+2
-2
No files matched your search
@@ -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 "$@"
|
||||
@@ -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 "$@"
|
||||
Reference in new issue
Block a user