-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Correctness
-
Fully Compatible
Using `pipx ensurepath` adds the pipx install directory to $PATH.
On v1.2.0 (the current version we pin) it does it in the following way:
- BEGIN pipx config
- pipx will install binaries to "~/.local/bin"
export PATH="/opt/undodb5/bin:/opt/cmake/bin:/opt/rtags-2.38/bin:/opt/undodb5/bin:/opt/cmake/bin:/opt/rtags-2.38/bin:/opt/undodb5/bin:/opt/cmake/bin:/opt/rtags-2.38/bin:/home/ubuntu/.rbenv/bin:/home/ubuntu/.local/bin:/home/ubuntu/.rbenv/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/cli_bin:/home/ubuntu/cli_bin:/home/ubuntu/cli_bin:/home/ubuntu/.local/bin:/home/ubuntu/.local/bin"
- END pipx config
This overwrites the whole path, this is bad.
On v1.4.3 it fixes this to append to the PATH like the following:
# Created by `pipx` on 2024-02-16 19:00:20 37 export PATH="$PATH:/home/ubuntu/.local/bin"
Original slack thread https://mongodb.slack.com/archives/C0V79S1PY/p1708108529128489