8000 [Bug] Incorrect PSModulePath when using folder redirection · Issue #6320 · ScoopInstaller/Scoop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug] Incorrect PSModulePath when using folder redirection #6320

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

Open
quantumfrost opened this issue Apr 9, 2025 · 0 comments
Open

[Bug] Incorrect PSModulePath when using folder redirection #6320

quantumfrost opened this issue Apr 9, 2025 · 0 comments
Labels

Comments

@quantumfrost
Copy link

Bug Report

Current Behavior

Example: scoop install gsudo
This causes scoop to add a user environment variable, PSModulePath and add two entries to it:

  1. <scoop-dir>/modules
  2. $env:USERPROFILE/Documents/WindowsPowerShell/Modules

Expected Behavior

The second path should take into account whether the user has used Windows Documents folder redirection.

Additional context/output

If the user has moved the Documents folder to a different location, PowerShell will store the modules there. Usually, PS will automatically add this path to PSModulePath at startup, but it doesn't if the user has set a custom path, like scoop does. Which is why scoop needs to add the second path in the first place.

Possible Solution

The second path above should actually be $([Environment]::GetFolderPath('MyDocuments'))/WindowsPowerShell/Modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant
0