We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2221898 commit c62e05eCopy full SHA for c62e05e
1 file changed
src/main/resources/io/viash/helpers/bashutils/ViashDockerFuns.sh
@@ -220,10 +220,13 @@ function ViashDockerBuild {
220
# create temporary directory to store dockerfile & optional resources in
221
local tmpdir=$(mktemp -d "$VIASH_META_TEMP_DIR/dockerbuild-$VIASH_META_NAME-XXXXXX")
222
local dockerfile="$tmpdir/Dockerfile"
223
- function clean_up {
224
- rm -rf "$tmpdir"
+
+ # Use a unique cleanup function name to avoid conflicts
225
+ VIASH_DOCKER_BUILD_TMPDIR="$tmpdir"
226
+ function ViashDockerBuildCleanup {
227
+ rm -rf "$VIASH_DOCKER_BUILD_TMPDIR"
228
}
- trap clean_up EXIT
229
+ ViashRegisterCleanup ViashDockerBuildCleanup
230
231
# store dockerfile and resources
232
ViashDockerfile "$VIASH_ENGINE_ID" > "$dockerfile"
0 commit comments