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:
@@ -26,7 +26,7 @@ trigger-builder-dockerfile-core-post-extract() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mv "$NEW_DOCKERFILE" Dockerfile
|
mv "$NEW_DOCKERFILE" Dockerfile
|
||||||
popd &>/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-dockerfile-core-post-extract "$@"
|
trigger-builder-dockerfile-core-post-extract "$@"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ trigger-builder-pack-core-post-extract() {
|
|||||||
if [[ "$NEW_PROJECT_TOML" != "project.toml" ]]; then
|
if [[ "$NEW_PROJECT_TOML" != "project.toml" ]]; then
|
||||||
mv "$NEW_PROJECT_TOML" project.toml
|
mv "$NEW_PROJECT_TOML" project.toml
|
||||||
fi
|
fi
|
||||||
popd &>/dev/null
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-builder-pack-core-post-extract "$@"
|
trigger-builder-pack-core-post-extract "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user