From 7d25fcdbdb51f28a1e6465edd819aa5d99bc0f71 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 13 Dec 2015 02:35:07 -0800 Subject: [PATCH] Simplify diff exit code handling. Summary: This fixes T9970 in an alternate manner, with the same effect: the binary_safe_diff.sh script returns 0 if the diff succeeds, 1 in all other cases. Test Plan: Tested locally with a fixed binary_safe_diff.sh, resulting in this correct review: https://reviews.freebsd.org/D4542 Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: eadler, Korvin, stevenh Maniphest Tasks: T9970 Differential Revision: https://secure.phabricator.com/D14759 --- scripts/repository/binary_safe_diff.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/repository/binary_safe_diff.sh b/scripts/repository/binary_safe_diff.sh index b51d31a6..00b02680 100755 --- a/scripts/repository/binary_safe_diff.sh +++ b/scripts/repository/binary_safe_diff.sh @@ -1,8 +1,3 @@ #!/bin/sh -diff "$@" -RES="$?" -if [ "$RES" = "2" ]; then - exit 1 -fi -exit "$RES" +diff "$@" || exit 1