Skip to content

Commit

Permalink
chore: Stop swallowing errors in .sh tests
Browse files Browse the repository at this point in the history
The Bash shell scripts ignored errors in all but the last line.
This commit adds `set -eo pipefail` to fix the issue:

`set -e` causes the script to exit as soon as any command exits with a
non-zero exit code. When pipes are used, this flag only applies to the
last command in a pipe. The `set -o pipefail` option ensures that the
script is also exited with a non-zero exit code when any command in the
pipe fails.
  • Loading branch information
Rob--W authored and rpl committed Jun 20, 2018
1 parent c0bf94f commit 7ff6e8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/run-browsers-smoketests.sh
@@ -1,4 +1,6 @@
#!/bin/bash
set -eo pipefail

echo ""
echo "Test webextension-polyfill on real browsers"
echo "==========================================="
Expand Down
2 changes: 2 additions & 0 deletions test/run-module-bundlers-smoketests.sh
@@ -1,4 +1,6 @@
#!/bin/bash
set -eo pipefail

echo ""
echo "Test webextension-polyfill bundled with webpack"
echo "==============================================="
Expand Down

0 comments on commit 7ff6e8a

Please sign in to comment.