diff options
author | Kristina Chodorow <kchodorow@google.com> | 2015-06-24 16:48:47 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-25 06:47:27 +0000 |
commit | 78f2e94bbfa69c42bf58614da5df5d0bd51f8ab6 (patch) | |
tree | a602587f1c6bea5855416ce840fae601234706ac /scripts/bootstrap/buildenv.sh | |
parent | e509c9617cdd1356d9a7a3741980dd358bf531e9 (diff) |
Make bazel compile error out when there's a run_silent command that fails
Also made it print the output for the problem command to make debugging easier.
--
MOS_MIGRATED_REVID=96783685
Diffstat (limited to 'scripts/bootstrap/buildenv.sh')
-rwxr-xr-x | scripts/bootstrap/buildenv.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh index 812e31909d..336785de71 100755 --- a/scripts/bootstrap/buildenv.sh +++ b/scripts/bootstrap/buildenv.sh @@ -53,7 +53,9 @@ atexit "if [ -f ${phasefile} ]; then echo >&2; cat ${phasefile} >&2; fi" function run_silent() { echo "${@}" >${errfile} - "${@}" >>${errfile} 2>&1 + # TODO(kchodorow): figure out why this doesn't exit on a non-zero exit code, + # even though errexit is set. + "${@}" >>${errfile} 2>&1 || exit $? rm ${errfile} } |