mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Fix SC2181 ("[ $?") outside tests/
Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12042
This commit is contained in:
+2
-5
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user