You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running pipx ensurepath, it sets the variable in the shells "rc" file. This causes issues when you run the command in one shell, but use another one later or use /bin/sh. A practical example of where this becomes an issue is docker: it uses /bin/sh to run commands, so the pipx ensurepath command sets the bashrc file and the path is still not set for subsequent Docker commands. This means that pipx ensurepath is essentially broken in Docker.
How to reproduce
Run `/bin/sh pipx ensurepath
Try to run an application with Pipx
The shell returns command not found
Expected behavior
I know that there is a debate about what the correct place is to set environment variables, but I think we can all agree that ./~bashrc is not one of those. I personally use /etc/environment, but I leave it up to the maintainers' discretion to pick an option.
Edit:
The issue seems that the userpath library has chosen to add to shell rc files, so it seems that wether to add to the RC file or not is not as clearcut as I thought. If you choose to leave the current behaviour, I think it would be a good idea to add the caveats of ensurepath in the documentation (and maybe add that you need to run the command at all in the installation guide).
The text was updated successfully, but these errors were encountered:
Describe the bug
When running
pipx ensurepath
, it sets the variable in the shells "rc" file. This causes issues when you run the command in one shell, but use another one later or use/bin/sh
. A practical example of where this becomes an issue is docker: it uses/bin/sh
to run commands, so thepipx ensurepath
command sets thebashrc
file and the path is still not set for subsequent Docker commands. This means thatpipx ensurepath
is essentially broken in Docker.How to reproduce
command not found
Expected behavior
I know that there is a debate about what the correct place is to set environment variables, but I think we can all agree that ./~bashrc is not one of those. I personally use /etc/environment, but I leave it up to the maintainers' discretion to pick an option.
Edit:
The issue seems that the
userpath
library has chosen to add to shell rc files, so it seems that wether to add to the RC file or not is not as clearcut as I thought. If you choose to leave the current behaviour, I think it would be a good idea to add the caveats of ensurepath in the documentation (and maybe add that you need to run the command at all in the installation guide).The text was updated successfully, but these errors were encountered: