Skip to content

Commit

Permalink
Merge pull request #6319 from shdarrina/pwsh-activate-macos
Browse files Browse the repository at this point in the history
Fix activate path for pwsh on MacOS
  • Loading branch information
oz123 authored Dec 30, 2024
2 parents 307505d + 7c085c1 commit d796a52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/6318.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Running "pipenv shell" on MacOS in Powershell (pwsh) references incorrect Activate.ps1
2 changes: 1 addition & 1 deletion pipenv/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d796a52

Please sign in to comment.