dockcross: Ensure exit code associated with run command is always returned

This commit is contained in:
Jean-Christophe Fillion-Robin 2016-10-27 11:32:22 -04:00
parent 904cb09858
commit c5edcb3a74
No known key found for this signature in database
GPG Key ID: 15C1A2812F958BD3

View File

@ -186,9 +186,15 @@ docker run $TTY_ARGS --name $CONTAINER_NAME \
$USER_IDS \
$FINAL_ARGS \
$FINAL_IMAGE "$@"
run_exit_code=$?
# Deleting the container while ignoring error is required because of
# https://circleci.com/docs/docker-btrfs-error/.
# See issue dockcross/dockcross#50 for more details.
docker rm -f $CONTAINER_NAME > /dev/null || true
exit $run_exit_code
################################################################################
#
# This image is not intended to be run manually.