Skip to content

Commit

Permalink
Move sh, bash and zsh detection to the end of matching
Browse files Browse the repository at this point in the history
csh needs to come before bash.
  • Loading branch information
oz123 committed Sep 13, 2024
1 parent 200f120 commit 6b4b8f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipenv/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def _get_activate_script(cmd, venv):

if cmd.endswith("fish"):
suffix = ".fish"
elif cmd.endswith(("sh", "bash", "zsh")):
suffix = ""
elif cmd.endswith("csh"):
suffix = ".csh"
elif cmd.endswith("xonsh"):
Expand All @@ -52,6 +50,8 @@ def _get_activate_script(cmd, venv):
elif cmd.endswith(("pwsh", "powershell")):
suffix = ".ps1"
command = "."
elif cmd.endswith(("sh", "bash", "zsh")):
suffix = ""
else:
sys.exit(f"unknown shell {cmd}")

Expand Down

0 comments on commit 6b4b8f3

Please sign in to comment.