Skip to content

Commit e98de40

Browse files
author
Trong Nhan Mai
committed
chore: but docker run inside +e instead of +u
Signed-off-by: Trong Nhan Mai <[email protected]>
1 parent 4f554b8 commit e98de40

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/release_scripts/run_macaron.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,12 @@ echo "" > ${TOKEN_FILE}
596596
echo "MCN_SELF_HOSTED_GITLAB_TOKEN=${MCN_SELF_HOSTED_GITLAB_TOKEN}"
597597
} >> ${TOKEN_FILE}
598598
mount_file "macaron_env_file" ${TOKEN_FILE} ${MACARON_WORKSPACE}/${TOKEN_FILE} "rw,Z"
599+
set -u
599600

600601
# Force docker to use linux/amd64 platform in order to make docker use emulation on ARM host platforms.
601-
# We need the `docker run` to be within set +u so that when it returns a non-zero status code, we don't exit right away and still run the token file cleaning up command.
602+
# We need the `docker run` command to be within `set +e`` so that when it returns a non-zero status code,
603+
# it doesn't exit right away and still run the token file cleaning up command.
604+
set +e
602605
docker run \
603606
--platform=linux/amd64 \
604607
--network=host \
@@ -611,6 +614,6 @@ docker run \
611614
"${IMAGE}:${MACARON_IMAGE_TAG}" \
612615
"${entrypoint[@]}" \
613616
"${macaron_args[@]}"
614-
set -u
617+
set -e
615618

616619
rm -f "$TOKEN_FILE"

0 commit comments

Comments
 (0)