From 6fcb53113a4d0e995d62a22dc6060f04d5505a3e Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 5 Aug 2019 15:57:54 -0400 Subject: [PATCH] fix: return true when removing temporary files extracted from docker If you are running docker in docker, the permissions on the generated file are such that they may not be accessible by the normal dokku user. For dokku, it is good enough to ignore the failed removal. --- plugins/common/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common/functions b/plugins/common/functions index 35a134231..c6cf31225 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -391,7 +391,7 @@ copy_from_image() { fi TMP_FILE_COMMAND_OUTPUT=$(mktemp "/tmp/dokku-${FUNCNAME[0]}.XXXX") - trap "rm -rf '$TMP_FILE_COMMAND_OUTPUT' >/dev/null" RETURN + trap "rm -rf '$TMP_FILE_COMMAND_OUTPUT' >/dev/null || true" RETURN local CID=$("$DOCKER_BIN" create "${DOCKER_CREATE_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS "$IMAGE") "$DOCKER_BIN" cp "$CID:$SRC_FILE" "$TMP_FILE_COMMAND_OUTPUT" 2>/dev/null || true