1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 11:31:46 +00:00

fix: resolve unbound variable error in safe_clean (bash 3.2 compatibility)

This commit is contained in:
Tw93
2026-01-11 09:58:37 +08:00
parent 54be4e30a2
commit e58c7128b0

View File

@@ -342,7 +342,11 @@ safe_clean() {
valid_targets+=("$target")
done
targets=("${valid_targets[@]}")
if [[ ${#valid_targets[@]} -gt 0 ]]; then
targets=("${valid_targets[@]}")
else
targets=()
fi
if [[ ${#targets[@]} -eq 0 ]]; then
return 0
fi