Skip to content

Commit

Permalink
Added a note about sourcing the shell config file for ensure_path (#…
Browse files Browse the repository at this point in the history
…1359)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
trag1c and pre-commit-ci[bot] authored Apr 23, 2024
1 parent 514c1df commit 2af2473
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/1346.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a note about sourcing the shell config file for `ensure_path`
2 changes: 1 addition & 1 deletion src/pipx/commands/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def warn_if_not_on_path(local_bin_dir: Path) -> None:
environment variable. These apps will not be globally
accessible until your PATH is updated. Run `pipx ensurepath` to
automatically add it, or manually modify your PATH in your
shell's config file (i.e. ~/.bashrc).
shell's config file (e.g. ~/.bashrc).
""",
subsequent_indent=" " * 4,
)
Expand Down
6 changes: 4 additions & 2 deletions src/pipx/commands/ensure_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def ensure_path(location: Path, *, force: bool) -> Tuple[bool, bool]:
f"""
{location_str} has been been added to PATH, but you need to
open a new terminal or re-login for this PATH change to take
effect.
effect. Alternatively, you can source your shell's config file
with e.g. 'source ~/.bashrc'.
""",
subsequent_indent=" " * 4,
)
Expand Down Expand Up @@ -140,7 +141,8 @@ def ensure_pipx_paths(force: bool) -> ExitCode:
pipx_wrap(
"""
You will need to open a new terminal or re-login for the PATH
changes to take effect.
changes to take effect. Alternatively, you can source your shell's
config file with e.g. 'source ~/.bashrc'.
"""
)
+ "\n"
Expand Down

0 comments on commit 2af2473

Please sign in to comment.