Skip to content

Commit df3f83e

Browse files
author
Mikhail Zabaluev
authored
Merge pull request #1186 from input-output-hk/detect-pipefail-available
Detect if `set -o pipefail` is available
2 parents 65ea6fc + 785aa52 commit df3f83e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/bootstrap

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ check_program_in_path $CLI
5353
check_program_in_path $NODE
5454

5555
# exit on failure inside pipes (might be unavailable on some shells)
56-
set -o pipefail || true
56+
set -o | grep 'pipefail' > /dev/null
57+
if [ $? -eq 0 ]; then
58+
set -o pipefail
59+
fi
5760
# exit on failure
5861
set -e
5962

0 commit comments

Comments
 (0)