From cddd6990b79f519cbebcdfb119301815b90c386a Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Sun, 1 Sep 2024 22:12:08 +0200 Subject: [PATCH] Fix shell detection --- pipenv/shells.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pipenv/shells.py b/pipenv/shells.py index 23c1a2adb3..6b0adfab47 100644 --- a/pipenv/shells.py +++ b/pipenv/shells.py @@ -36,19 +36,19 @@ def _get_activate_script(cmd, venv): does not work elsewhere anyway. """ # Suffix and source command for various shells. - if cmd.endswith("/sh", "/bash", "/zsh"): + if cmd.endswith(("sh", "bash", "zsh")): suffix = "" command = "." - elif cmd.endswith("/fish"): + elif cmd.endswith("fish"): suffix = ".fish" command = "source" - elif cmd.endswith("/csh"): + elif cmd.endswith("csh"): suffix = ".csh" command = "source" - elif cmd.endswith("/xonsh"): + elif cmd.endswith("xonsh"): suffix = ".xsh" command = "source" - elif cmd.endswith("/nu"): + elif cmd.endswith("nu"): suffix = ".nu" command = "overlay use" else: