-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Milestone
Description
Based on @PowerShell/powershell-committee decision at PowerShell/PowerShell-RFC#133 (comment), we should:
- PSCore6 currently will create $env:PSModulePath from config.json file, a new setting EnvVarToAppendToPSModulePath with value PSModulePath (this means the $PSHOME/Modules and user paths are first, then appends the $env:PSModulePath from the system)
- Some logic needs to be retained so child PSCore6 trims any duplicates in $env:PSModulePath
- When pwsh is started, we preserve the original $env:PSModulePath. Have whitelist to special case powershell.exe and powershell_ise.exe so when they are started within pwsh, they receive the original $env:PSModulePath. In all other cases, they inherit the current $env:PSModulePath.
- Since modules are auto-discovered by newest version and not by order of the path, there is a scenario where starting different versions of pwsh from pwsh may result in unexpected behavior.
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime