From 94500a0464b962b063a63d4f2802c4b4a8d51cf0 Mon Sep 17 00:00:00 2001 From: Darrin Allred <141358268+shdarrina@users.noreply.github.com> Date: Mon, 25 Nov 2024 05:46:00 -0700 Subject: [PATCH 1/2] Fix activate path for pwsh on MacOS --- pipenv/shells.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/shells.py b/pipenv/shells.py index 70938a1f35..888cec7bea 100644 --- a/pipenv/shells.py +++ b/pipenv/shells.py @@ -61,7 +61,7 @@ def _get_activate_script(cmd, venv): if suffix == "nu": return f"overlay use {venv_location}" - elif suffix == ".ps1": + elif suffix == ".ps1" and os.name == "nt": return f". {venv_location}\\Scripts\\Activate.{suffix}" # The leading space can make history cleaner in some shells. From 9ffa28c2baef3868f889e814ee554be5a2f715be Mon Sep 17 00:00:00 2001 From: Darrin Allred <141358268+shdarrina@users.noreply.github.com> Date: Mon, 25 Nov 2024 06:06:37 -0700 Subject: [PATCH 2/2] Add 6318.bugfix.rst --- news/6318.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/6318.bugfix.rst diff --git a/news/6318.bugfix.rst b/news/6318.bugfix.rst new file mode 100644 index 0000000000..01e1bf855c --- /dev/null +++ b/news/6318.bugfix.rst @@ -0,0 +1 @@ +Running "pipenv shell" on MacOS in Powershell (pwsh) references incorrect Activate.ps1