-
Notifications
You must be signed in to change notification settings - Fork 87
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
Import-Module PoshRSJob overwrites $env:PSModulePath on PS Core 6.0.1 due to Add-WindowsPSModulePath incompatibility #175
Labels
Comments
It's caused by PoshRSJob.psm1 $PoshRS_jobCleanup.Runspace =[runspacefactory]::CreateRunspace()
$PoshRS_jobCleanup.Runspace.Open() If you uncomment those (which obviously breaks everything) it will load without overwriting the module path. But only if you've modified it using Add-WindowsPSModulePath. If you modified it manually then the path isn't lost. I'm not sure why the two are different though. |
codykonior
changed the title
Import-Module PoshRSJob overwrites $env:PSModulePath on PS Core 6.0.1
Import-Module PoshRSJob overwrites $env:PSModulePath on PS Core 6.0.1 due to Add-WindowsPSModulePath incompatibility
Feb 24, 2018
codykonior
added a commit
to codykonior/PoshRSJob
that referenced
this issue
Feb 24, 2018
…eing clobbered on PS Core
codykonior
added a commit
to codykonior/PoshRSJob
that referenced
this issue
Feb 24, 2018
…eing clobbered on PS Core
Didn't mean to auto-close this. Definitely want to keep it around to find the root cause of the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Incompatibility.
What is the current behavior?
PowerShell Core 6 doesn't include the standard PSModulePath, instead it can be added using the WindowsPSModulePath module and Add-WindowsPSModulePath.
If you do this though and Import-Module PoshRSJob then the path gets lost. This doesn't appear to happen with other modules I tested.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
The first import works (assuming it's on your path). The second fails because it won't be on the path any longer.
Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
The text was updated successfully, but these errors were encountered: