From 0c7b575b9b948ba8c650764e666f10ee2c9ab64b Mon Sep 17 00:00:00 2001 From: Christopher Horrell Date: Thu, 31 May 2018 17:47:58 -0400 Subject: [PATCH 1/2] test-build.sh should have set -e This will cause the script to exit on failure when a command, like test-imagr.sh, fails. --- test-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-build.sh b/test-build.sh index e76787d38..4957a1fb5 100755 --- a/test-build.sh +++ b/test-build.sh @@ -2,7 +2,7 @@ # # Run a test build for all images. -set -uo pipefail +set -euo pipefail . functions.sh From 5a8088bab1c03314a37ee381103aac26f80680df Mon Sep 17 00:00:00 2001 From: Christopher Horrell Date: Thu, 31 May 2018 17:49:15 -0400 Subject: [PATCH 2/2] Use exit code 1 for all tests. There's no real good reason why they were different and exit code 1 is pretty standard and well understood. --- test-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-image.sh b/test-image.sh index 5f257a1f0..e409e3bc3 100755 --- a/test-image.sh +++ b/test-image.sh @@ -7,12 +7,12 @@ echo "Test for node succeeded." if ! npm --version >/dev/null; then echo "Test for npm failed!" - exit 2 + exit 1 fi echo "Test for npm succeeded." if ! yarn --version >/dev/null; then echo "Test of yarn failed!" - exit 3 + exit 1 fi echo "Test for yarn succeeded."