From: Guo Xiang Tan Date: Tue, 18 Sep 2018 09:28:56 +0000 (+0800) Subject: `./launhcer run` should exit with the right code. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f126bcc60e797084f9d5209961f82f92b545a86c;p=discourse_docker.git `./launhcer run` should exit with the right code. --- diff --git a/launcher b/launcher index 5b5d5dc..fb6bbd7 100755 --- a/launcher +++ b/launcher @@ -592,8 +592,13 @@ setup_bootstrap() { run_run() { setup_bootstrap - $docker_path run --rm --shm-size=512m $user_args $links "${env[@]}" -e DOCKER_HOST_IP="$docker_ip" -i -a stdin -a stdout -a stderr $volumes $image \ - /bin/bash -c "$run_command" + unset ERR + (exec $docker_path run --rm --shm-size=512m $user_args $links "${env[@]}" -e DOCKER_HOST_IP="$docker_ip" -i -a stdin -a stdout -a stderr $volumes $image \ + /bin/bash -c "$run_command") || ERR=$? + + if [[ $ERR > 0 ]]; then + exit 1 + fi } run_bootstrap() {