diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-10 12:28:51 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-10 12:28:51 -0700 |
commit | 79b28210e3af5422002ef4ad79e77620295a4d38 (patch) | |
tree | 39a351a53fce578b7dc069e250f0decd5baf13e3 /t/test-lib.sh | |
parent | 1925c176d2b822c6c17aec472e318669f054beda (diff) | |
download | rainbows-79b28210e3af5422002ef4ad79e77620295a4d38.tar.gz |
pipefail is extremely useful for detecting bad exits _anywhere_ in pipelines, not just the last command. Combined with "set -e", pipefail leads to very unforgiving scripts that bail out at the first sign of error, exactly what we want in tests.
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index e5b0bc8..d278329 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1,5 +1,7 @@ #!/bin/sh # Copyright (c) 2009 Rainbows! developers + +set -o pipefail >/dev/null 2>&1 || : # non-POSIX, but useful in ksh/bash set -e set -u T=$(basename $0) |