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 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.