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

Remove linuxbrew from path when detecting shell #6213

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/6197.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove linuxbrew from path when detecting shells.
5 changes: 5 additions & 0 deletions pipenv/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def _get_activate_script(cmd, venv):
This is POSIX-only at the moment since the compat (pexpect-based) shell
does not work elsewhere anyway.
"""

# Split on linuxbrew in case users have installed there shell using it.
# Otherwise the `nu` substring will trigger the nu shell path.
cmd = cmd.split(".linuxbrew")[-1]

# Suffix and source command for other shells.
# Support for fish shell.
if "fish" in cmd:
Expand Down
Loading