From 3b5707b078c41e08642f89eaa4d240179e30f3fd Mon Sep 17 00:00:00 2001 From: tw93 Date: Sat, 28 Feb 2026 20:19:30 +0800 Subject: [PATCH] fix(clean): skip pip cache cleanup when pip3 is macOS stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On macOS 15+, /usr/bin/pip3 exists as a stub that triggers Command Line Tools installation dialog. The previous check only verified command existence, causing false "pip cache ยท would clean" output for users without actual pip3 installed. Now verifies pip3 is functional by checking `pip3 --version` before attempting cleanup. Fixes #512 --- lib/clean/dev.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/clean/dev.sh b/lib/clean/dev.sh index c52a11b..cc7c802 100644 --- a/lib/clean/dev.sh +++ b/lib/clean/dev.sh @@ -95,7 +95,8 @@ clean_dev_npm() { } # Python/pip ecosystem caches. clean_dev_python() { - if command -v pip3 > /dev/null 2>&1; then + # Check pip3 is functional (not just macOS stub that triggers CLT install dialog) + if command -v pip3 > /dev/null 2>&1 && pip3 --version > /dev/null 2>&1; then clean_tool_cache "pip cache" bash -c 'pip3 cache purge > /dev/null 2>&1 || true' note_activity fi