summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-03-18 17:09:31 -0700
committerGitHub <noreply@github.com>2021-03-19 00:09:31 +0000
commit86f05289d8fb50875d58ed491380bb8b4097d4eb (patch)
tree14c3eac249ec7851773344d9b81b457b33d1a2ea
parent2c14fc3c11052e1db1bac3beb8193b9f05e45412 (diff)
downloadbinaryen-86f05289d8fb50875d58ed491380bb8b4097d4eb.tar.gz
binaryen-86f05289d8fb50875d58ed491380bb8b4097d4eb.tar.bz2
binaryen-86f05289d8fb50875d58ed491380bb8b4097d4eb.zip
Add `-o pipefail` to shell scripts (#3706)
This means that if any command in a pipelines fails the whole pipeline will also fail.
-rwxr-xr-xscripts/clang-format-diff.sh1
-rwxr-xr-xscripts/clang-tidy-diff.sh1
-rwxr-xr-xscripts/emcc-tests.sh3
3 files changed, 4 insertions, 1 deletions
diff --git a/scripts/clang-format-diff.sh b/scripts/clang-format-diff.sh
index fa858b9ab..c1f1885b7 100755
--- a/scripts/clang-format-diff.sh
+++ b/scripts/clang-format-diff.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -o errexit
+set -o pipefail
# When we are running on travis and *not* part of a pull request we don't
# have any upstream branch to compare against.
diff --git a/scripts/clang-tidy-diff.sh b/scripts/clang-tidy-diff.sh
index 1bed470cd..230764abe 100755
--- a/scripts/clang-tidy-diff.sh
+++ b/scripts/clang-tidy-diff.sh
@@ -1,6 +1,7 @@
#!/bin/bash
set -o errexit
+set -o pipefail
if [ -n "$GITHUB_BASE_REF" ]; then
BRANCH="origin/$GITHUB_BASE_REF"
diff --git a/scripts/emcc-tests.sh b/scripts/emcc-tests.sh
index ec3c5ec48..409ba256e 100755
--- a/scripts/emcc-tests.sh
+++ b/scripts/emcc-tests.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
-set -e
+set -o errexit
+set -o pipefail
mkdir -p emcc-build
echo "emcc-tests: build:wasm"