1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 23:40:09 +00:00

fix(clean): resolve unbound variable 'mount_points[@]' error in empty array case (#511)

This commit is contained in:
tw93
2026-02-28 09:53:07 +08:00
parent 61cf5271eb
commit 646ff72a96

View File

@@ -390,7 +390,7 @@ clean_xcode_simulator_runtime_volumes() {
local unused_count=0
for candidate in "${sorted_candidates[@]}"; do
local status="UNUSED"
if _sim_runtime_is_path_in_use "$candidate" "${mount_points[@]}"; then
if [[ ${#mount_points[@]} -gt 0 ]] && _sim_runtime_is_path_in_use "$candidate" "${mount_points[@]}"; then
status="IN_USE"
in_use_count=$((in_use_count + 1))
else