Hi guys, I run into a potential problem w/ the command
$ pipx ensurepath
More context:
Describe the bug
When I run ensurepath the path $HOME/.local/bin is inserted twice both in .zshrc and in .zprofile
Then, my path is polluted with doubled entries
<other_stuff>:/Users/myuser/.local/bin:/Users/myuser/.local/bin
How to reproduce
$ python -m pip install pipx
$ pipx ensurepath
Expected behavior
Just one entry of /Users/myuser/.local/bin should be added to the path.
Same on Windows 10
Saw the same with several dozen entries in my system PATH being duplicated into my user PATH.
The cause is actually a bug in the userpath library used by pipx. I've opened an issue here:
https://github.com/ofek/userpath/issues/23
EDIT: Above only applies to Windows, but a similar bug may be present in the equivalent Unix handling within the same library.
@ciarancourtney @ralish Windows is fixed in 1.4.0 (see https://github.com/ofek/userpath/pull/24)
The OP's issue is different https://github.com/ofek/userpath/issues/3#issuecomment-512928319
Confirming this is fixed (on Windows) with userpath 1.4.0. Thanks @ofek!
Not fixed for macOS