diff options
author | наб <[email protected]> | 2021-05-14 11:55:17 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-05-20 08:54:47 -0700 |
commit | 2ca77988a5584440b9d322ebb26ab55c730637bf (patch) | |
tree | 06e18642bd5e76503e5f09f591443d348f6dda01 /scripts/zloop.sh | |
parent | 1d106ab57a53dced72d0798c62635f11b8242bd1 (diff) |
Fix SC2181 ("[ $?") outside tests/
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12042
Diffstat (limited to 'scripts/zloop.sh')
-rwxr-xr-x | scripts/zloop.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/zloop.sh b/scripts/zloop.sh index bbe326aa0..f2eff6e94 100755 --- a/scripts/zloop.sh +++ b/scripts/zloop.sh @@ -62,11 +62,8 @@ function usage function or_die { # shellcheck disable=SC2068 - $@ - # shellcheck disable=SC2181 - if [[ $? -ne 0 ]]; then - # shellcheck disable=SC2145 - echo "Command failed: $@" + if ! $@; then + echo "Command failed: $*" exit 1 fi } |