Skip to content

Commit 785aa52

Browse files
(#1182) detect if set -o pipefail is available
1 parent 65ea6fc commit 785aa52

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)