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:
наб
2021-05-14 11:55:17 +02:00
committed by Brian Behlendorf
parent 1d106ab57a
commit 2ca77988a5
11 changed files with 29 additions and 52 deletions
+2 -4
View File
@@ -491,10 +491,8 @@ for TAG in $POOL_TAGS; do
POOL_NAME=$($ZPOOL_CMD import -d "$POOL_DIR_COPY" | \
awk '/pool:/ { print $2; exit 0 }')
$ZPOOL_CMD import -N -d "$POOL_DIR_COPY" \
"$POOL_NAME" &>/dev/null
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
if ! $ZPOOL_CMD import -N -d "$POOL_DIR_COPY"
"$POOL_NAME" &>/dev/null; then
fail_nonewline
ERROR=1
else