diff --git a/services/wolf.sh b/services/wolf.sh index 85c6d8e..e40dd28 100644 --- a/services/wolf.sh +++ b/services/wolf.sh @@ -647,8 +647,13 @@ UDEV ((_ci++)) done < <(lsblk -Pno NAME,MOUNTPOINT,SIZE,LABEL,UUID 2>/dev/null) - # Unmounted block devices — skip disks that have any mounted partition - local -a _UNMT_DEV _UNMT_LABEL _UNMT_UUID + # Unmounted block devices — skip disks that have any mounted partition. + # Explicit =() initializers, not bare `local -a` — under setup.sh's + # `set -u`, an array that never gets an element assigned (e.g. a laptop + # with no second/unmounted drive at all) can still trip "unbound + # variable" on later reads like ${#_UNMT_DEV[@]} below, even though it + # was declared with `local -a`. Confirmed live on a single-drive laptop. + local -a _UNMT_DEV=() _UNMT_LABEL=() _UNMT_UUID=() local _ui=0 while IFS= read -r _line; do local _name _size _type _fstype _mnt _label