Skip to content

Commit e962ba3

Browse files
andy5995claude
andcommitted
fix: resolve shellcheck warnings in test_btrfs_clone.sh
- Quote $(id -u) to prevent word splitting (SC2046) - Replace [ -n "$(mount | grep ...)" ] with mount | grep -q (SC2143) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 92f058a commit e962ba3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_btrfs_clone.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ IS_BTRFS_MOUNTED="$(mount | grep rmw-btrfs)" || true
2222
if [ -z "$IS_BTRFS_MOUNTED" ]; then
2323
sudo mount -o loop "$IMAGE_PATH" \
2424
"$BTRFS_IMAGE_MOUNTPOINT"
25-
sudo chown $(id -u) -R "$BTRFS_IMAGE_MOUNTPOINT"
25+
sudo chown "$(id -u)" -R "$BTRFS_IMAGE_MOUNTPOINT"
2626
fi
2727

2828
cd "$BTRFS_IMAGE_MOUNTPOINT"
@@ -70,7 +70,7 @@ test -f foo
7070

7171
cd
7272

73-
if [ -n "$(mount | grep rmw-btrfs)" ]; then
73+
if mount | grep -q rmw-btrfs; then
7474
sudo umount "$BTRFS_IMAGE_MOUNTPOINT"
7575
fi
7676

0 commit comments

Comments
 (0)