mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user