From 52e3538c2d15960b2c8307a20def8046a613b9ac Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Thu, 4 Mar 2021 14:25:42 -0800 Subject: [PATCH] Fix exit code check --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 6f68c52..e1b0619 100755 --- a/backup.sh +++ b/backup.sh @@ -314,7 +314,7 @@ array-sum () { # Given two exit codes, print a nonzero one if there is one exit-code () { - if [ "$1" -ne 0 ]; then + if [[ "$1" != "0" ]]; then echo "$1" else if [[ "$2" == "" ]]; then