Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fancy mode for pwsh on *nix (draft) #6108

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

samcarswell
Copy link
Contributor

Ran into this issue when attempting to activate pipenv environments using pwsh on mac. I'm not 100% sure this is the correct solution as the documentation for fancy mode is sparse, but it seems the code enforces fancy mode if running on windows (because it's assumed it's pwsh?)

Definitely looking for some feedback. Thanks.

The issue

Issue is described in #6107

The fix

Defaulting to fancy mode for pwsh on *nix

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

# Use fancy mode for Windows or pwsh on *nix.
if (
os.name == "nt"
or os.environ["PIPENV_SHELL"].split(os.path.sep)[-1] == "pwsh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if these lookups from os.environ should actually be gets in case they are not defined?

@matteius matteius merged commit 70d2d28 into pypa:main Mar 27, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants