Browse Source

Fix: Exit from the docker-mender-convert upon error

Previously the script would just exit 0, no matter the result of the conversion.

This simply exits with the exit code from the container, which is the exit code
from the conversion script.

Changelog: None
Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
2.5.x
Ole Petter 4 years ago
committed by Lluis Campos
parent
commit
244ebc8e71
  1. 6
      docker-mender-convert

6
docker-mender-convert

@ -44,6 +44,10 @@ docker run \
--env MENDER_CONVERT_LOG_FILE=logs/${LOG_FILE} \
$IMAGE_NAME "$@"
[ $? -eq 0 ] && rmdir ${WORK_DIR}
exit_code=$?
[ ${exit_code} -eq 0 ] && rmdir ${WORK_DIR}
echo "Log file available at: logs/${LOG_FILE}"
exit ${exit_code}

Loading…
Cancel
Save