Skip to content

Update get_pip_version function to check for pip3#4

Open
pdufour wants to merge 2 commits into
mprpic:mainfrom
pdufour:patch-1
Open

Update get_pip_version function to check for pip3#4
pdufour wants to merge 2 commits into
mprpic:mainfrom
pdufour:patch-1

Conversation

@pdufour
Copy link
Copy Markdown
Contributor

@pdufour pdufour commented May 12, 2026

Summary

When I install python via homebrew, it doesnt install a pip command, it only installs a pip3 command:

pauldufour@Pauls-MacBook-Pro ~ % which pip
pip not found
pauldufour@Pauls-MacBook-Pro ~ % which pip3
/opt/homebrew/bin/pip3
pauldufour@Pauls-MacBook-Pro ~ % 

This makes it so the pip check in cooldowns checks for the pip3 as well as the pip command.

Test Plan

Run set cmd

cooldowns.sh set pip 7d
pip: set PIP_UPLOADED_PRIOR_TO="P7D" in /Users/pauldufour/.zshrc

Comment thread cooldowns.sh

cat >> "$PROFILE_SCRIPT" << SHELL
# cooldowns:pip:start
pip() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the name of the wrapper itself needs to be modified here, otherwise if users are executing pip3 then this will never trigger the wrapper.

Comment thread cooldowns.sh
local tool="$1"
command -v "$tool" &>/dev/null && return 0
find_in_profiles "cooldowns:${tool}:start" &>/dev/null && return 0
case "$tool" in
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add pip3 here as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants