Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globbing for PIPX_BIN_DIR #94

Closed
beorn opened this issue Feb 24, 2019 · 3 comments · Fixed by #1241
Closed

Globbing for PIPX_BIN_DIR #94

beorn opened this issue Feb 24, 2019 · 3 comments · Fixed by #1241
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@beorn
Copy link

beorn commented Feb 24, 2019

I set $PIPX_BIN_DIR to ~/bin and it created a directory called ~ in my home directory.

% pipx list                 
venvs are in /Users/bjorn/.local/pipx/venvs
binaries are exposed on your $PATH at /Users/bjorn/~/bin
   package pipsi 0.9, Python 3.7.2
    - pipsi
@rkennedy
Copy link

What's your shell, and how did you set PIPX_BIN_DIR?

If you use bash or zsh, either of the following should have caused the shell to expand the tilde expression, so pipx would have seen the full path and wouldn't need to do any special tilde expansion of its own:

PIPX_BIN_DIR=~/bin
export PIPX_BIN_DIR

export PIPX_BIN_DIR=~/bin

Did you perhaps quote the assignment, as in PIPX_BIN_DIR="~/bin"? Shells don't do tilde expansion in quotes, so you should remove the quotes in that case.

@beorn
Copy link
Author

beorn commented Jun 22, 2019

I'm using zsh, and I originally had export PIPX_BIN_DIR="~/bin" as you expected, but changed it to export PIPX_BIN_DIR="$HOME/bin" as tilde wasn't expanded. I could do it the way you recommend as well.

I have this exact syntax ("~/..") for other env vars (e.g., ssh) so I guess I was just expecting it to work. Not a big deal, but perhaps consider os.path.expanduser?

@gaborbernat
Copy link
Contributor

PR welcome.

@gaborbernat gaborbernat added bug Something isn't working help wanted Extra attention is needed labels Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants