Add checks for empty product_dirs and version_dirs arrays before
iterating to prevent "unbound variable" errors when running with
set -u (pipefail) and the JetBrains Toolbox directory doesn't exist
or contains no products.
- Add safe cleanup for Antigravity, Filo, and Claude caches in Application Support (Cache, GPUCache, Code Cache only).
- Enhance VS Code cleanup to include deep rendering caches (GPU, Dawn) and extension installers.
- Validated to ensure no user data or pnpm/yarn executables are touched.
This commit addresses several code quality issues identified in the
recent bash 3.2 compatibility fixes:
1. Remove redundant array length check in is_whitelisted()
- The second check for array length > 0 is unnecessary after
already checking for length == 0
2. Clean up commented dangerous cleanup code in dev.sh
- Replace commented-out code with clear documentation
- Add explicit notes explaining why certain paths are excluded
- Improves maintainability by preventing confusion
3. Enhance test coverage for excluded paths
- Add tests to verify Mix archives are NOT cleaned
- Add tests to verify Stack programs are NOT cleaned
- Add tests to verify VS Code workspace storage is NOT cleaned
- These tests ensure critical data remains protected
All changes pass ShellCheck, syntax validation, and formatting checks.
- Fix safe_remove set -e trap in command substitution
- Fix has_full_disk_access false positives and unknown state handling
- Use set +e in perform_cleanup for graceful degradation
- Track removal failures and only count actually deleted items (#180)
- Add "Skipped X items (permission denied or in use)" notification
- Improve spinner reliability with cooperative stop mechanism (#175)