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

Check end of path for shell detection #6212

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@
Update shell detection to only check the end of the command used.
8 changes: 4 additions & 4 deletions pipenv/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ def _get_activate_script(cmd, venv):
"""
# Suffix and source command for other shells.
# Support for fish shell.
if "fish" in cmd:
if cmd.endswith("fish"):
suffix = ".fish"
command = "source"
# Support for csh shell.
elif "csh" in cmd:
elif cmd.endswith("csh"):
suffix = ".csh"
command = "source"
elif "xonsh" in cmd:
elif cmd.endswith("xonsh"):
suffix = ".xsh"
command = "source"
elif "nu" in cmd:
elif cmd.endswith("nu"):
suffix = ".nu"
command = "overlay use"
else:
Expand Down
Loading