Skip to content

Conversation

socram8888
Copy link
Contributor

@socram8888 socram8888 commented Dec 3, 2024

Thank you for contributing to Pipenv!

The issue

When using PowerShell in Windows, executing pipenv shell inside a UNC path (such as a SMB share) will cause a CMD.EXE error to be thrown, and a change to an incorrect CWD (normally, C:\Windows)

The fix

By disabling the shell functionality of subprocess.call, this is avoided.

On Windows, when this parameter is set to true, causes an intermediate CMD.EXE to be spawned between Python and PowerShell, which does not support the UNC path, causing the wrong CWD to be presented to the final PowerShell shell.

The checklist

  • Associated issue (pipenv shell not changing directory on Windows remote share #4438)
  • 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 #.

@matteius matteius merged commit 3fe3542 into pypa:main Apr 21, 2025
21 of 22 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