about summary refs log tree commit homepage
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 29b57f7..5b9a90a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1,7 +1,18 @@
 #!/bin/sh
 # Copyright (c) 2009 Rainbows! developers
 
-set -o pipefail >/dev/null 2>&1 || : # non-POSIX, but useful in ksh/bash
+# pipefail is non-POSIX, but useful in ksh/bash
+(
+        set +e
+        set -o pipefail
+)
+if test $? -eq 0
+then
+        set -o pipefail
+else
+        echo >&2 "WARNING: your shell does not understand pipefail"
+fi
+
 set -e
 set -u
 T=$(basename $0)