commit 4172b638b8221e2d56c20e2a408948977c68358a
parent 9e04a8722081cd761ee3a2e173b53c7859a8c916
Author: rl1987 <rl1987@sdf.lonestar.org>
Date: Wed, 3 Apr 2019 18:03:34 +0300
Fix SC2015 warning
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test_key_expiration.sh b/src/test/test_key_expiration.sh
@@ -47,7 +47,7 @@ dump() { xxd -p "$1" | tr -d '\n '; }
die() { echo "$1" >&2 ; exit 5; }
check_dir() { [ -d "$1" ] || die "$1 did not exist"; }
check_file() { [ -e "$1" ] || die "$1 did not exist"; }
-check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; }
+check_no_file() { if [ -e "$1" ]; then die "$1 was not supposed to exist"; fi }
check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: $(dump "$1") vs $(dump "$2")"; }
check_keys_eq() { check_files_eq "${SRC}/keys/${1}" "${ME}/keys/${1}"; }