chiark / gitweb /
Test suite: drs-push-rejects: use set +o pipefail, not set +e
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Jun 2015 13:01:48 +0000 (14:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Jun 2015 13:01:48 +0000 (14:01 +0100)
tests/tests/drs-push-rejects

index 5b450bf..74ddd37 100755 (executable)
@@ -13,10 +13,10 @@ cd $p
 mustfail () {
        local wantmsg="$1"; shift
        t-reporefs >$tmp/show-refs.pre-push
-       set +e
+       set +o pipefail
        git push origin "$@" 2>&1 |tee $tmp/mustfail.txt
        ps="${PIPESTATUS[*]}"
-       set -e
+       set -o pipefail
        case $ps in
        "0 0")  fail "push unexpectedly succeeded (instead of: $wantmsg)" ;;
        *" 0")  ;;