mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 19:40:07 +00:00
fix(clean): skip pip cache cleanup when pip3 is macOS stub
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user