You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
Add-WindowsPSModulePath adds empty entries in certain cases. #62
Add-WindowsPSModulePath adds empty entries if any of the environment variables contain empty strings like path;;path or [System.Environment]::GetEnvironmentVariable('PSModulePath', [System.EnvironmentVariableTarget]::User) is null or empty.
The design was to merge the paths exactly as they are but eliminating duplicates. If there are empty elements in any of the components, they get copied into resulting path. But adding spaces because one of the components is $null is unacceptable so we should fix this. The simplest solution is
Add-WindowsPSModulePathadds empty entries if any of the environment variables contain empty strings likepath;;pathor[System.Environment]::GetEnvironmentVariable('PSModulePath', [System.EnvironmentVariableTarget]::User)is null or empty.After running
Add-WindowsPSModulePath:This can be mitigated by changing
to