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 5b450bf85cc32efc9acff695643d3cefbfce977b..74ddd37adcc1f9100b5af629016ed4cb4066f253 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")  ;;