summaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-08-19 11:18:43 +1000
committerRob Pike <r@golang.org>2013-08-19 11:18:43 +1000
commitddc576860e8cba70a3e539f6ae2e79b5da46150e (patch)
tree30bebb177a7b61d4debf18cbb4429141d6a0f6dd /src/make.bash
parent18673aa9ba1f818a20dd59bd825a166b63d1039e (diff)
downloadgo-ddc576860e8cba70a3e539f6ae2e79b5da46150e.tar.gz
make.bash: exit if dist fails
The shell's -e doesn't work across "eval"; need to error-check by hand. The recent spate of Darwin build failures pointed out that if the first run of cmd/dist fails, we keep going. We shouldn't. R=golang-dev, dsymonds CC=golang-dev https://codereview.appspot.com/13098043
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/make.bash b/src/make.bash
index 10696e765..30388388f 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -117,7 +117,12 @@ if [ "$(uname)" == "Darwin" ]; then
fi
${CC:-gcc} $mflag -O2 -Wall -Werror -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
-eval $(./cmd/dist/dist env -p)
+# -e doesn't propagate out of eval, so check success by hand.
+eval $(./cmd/dist/dist env -p || echo FAIL=true)
+if [ "$FAIL" = true ]; then
+ exit 1
+fi
+
echo
if [ "$1" = "--dist-tool" ]; then