From 2d5ccf5d71bf43e2a17302e32b20f9a184beef52 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Mon, 19 Jan 2026 17:08:35 +0800 Subject: [PATCH] fix: exclude Flutter/CocoaPods/Pub caches from cleanup (#334) Prevent forced re-downloads and re-installations by not cleaning: - ~/Library/Caches/CocoaPods (spec repo cache) - ~/.cache/flutter (engine/artifacts cache) - ~/.pub-cache (Dart package cache) Also standardize redirection syntax to '> /dev/null' for consistency. Fixes #334 --- lib/clean/dev.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/clean/dev.sh b/lib/clean/dev.sh index 5ddfabc..6146f28 100644 --- a/lib/clean/dev.sh +++ b/lib/clean/dev.sh @@ -45,7 +45,7 @@ clean_dev_npm() { # Python/pip ecosystem caches. clean_dev_python() { if command -v pip3 > /dev/null 2>&1; then - clean_tool_cache "pip cache" bash -c 'pip3 cache purge >/dev/null 2>&1 || true' + clean_tool_cache "pip cache" bash -c 'pip3 cache purge > /dev/null 2>&1 || true' note_activity fi safe_clean ~/.pyenv/cache/* "pyenv cache" @@ -65,7 +65,7 @@ clean_dev_python() { # Go build/module caches. clean_dev_go() { if command -v go > /dev/null 2>&1; then - clean_tool_cache "Go cache" bash -c 'go clean -modcache >/dev/null 2>&1 || true; go clean -cache >/dev/null 2>&1 || true' + clean_tool_cache "Go cache" bash -c 'go clean -modcache > /dev/null 2>&1 || true; go clean -cache > /dev/null 2>&1 || true' note_activity fi } @@ -200,8 +200,8 @@ clean_dev_mobile() { # Simulator runtime caches. safe_clean ~/Library/Developer/CoreSimulator/Profiles/Runtimes/*/Contents/Resources/RuntimeRoot/System/Library/Caches/* "Simulator runtime cache" safe_clean ~/Library/Caches/Google/AndroidStudio*/* "Android Studio cache" - safe_clean ~/Library/Caches/CocoaPods/* "CocoaPods cache" - safe_clean ~/.cache/flutter/* "Flutter cache" + # safe_clean ~/Library/Caches/CocoaPods/* "CocoaPods cache" + # safe_clean ~/.cache/flutter/* "Flutter cache" safe_clean ~/.android/build-cache/* "Android build cache" safe_clean ~/.android/cache/* "Android SDK cache" safe_clean ~/Library/Developer/Xcode/UserData/IB\ Support/* "Xcode Interface Builder cache" @@ -219,7 +219,7 @@ clean_dev_other_langs() { safe_clean ~/.bundle/cache/* "Ruby Bundler cache" safe_clean ~/.composer/cache/* "PHP Composer cache" safe_clean ~/.nuget/packages/* "NuGet packages cache" - safe_clean ~/.pub-cache/* "Dart Pub cache" + # safe_clean ~/.pub-cache/* "Dart Pub cache" safe_clean ~/.cache/bazel/* "Bazel cache" safe_clean ~/.cache/zig/* "Zig cache" safe_clean ~/Library/Caches/deno/* "Deno cache"