-
Notifications
You must be signed in to change notification settings - Fork 7.8k
corrected use of PSModulePath casing to be consistent with Windows PowerShell #3255
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
Changes from 2 commits
4fa0946
915f7eb
2eefc09
9ef6975
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,12 @@ Describe 'use of a module from two runspaces' -Tags "CI" { | |
} | ||
New-ModuleManifest @manifestParams | ||
|
||
if ($env:PSMODULEPATH -notlike "*$TestModulePath*") { | ||
$env:PSMODULEPATH += "$([System.IO.Path]::PathSeparator)$TestModulePath" | ||
if ($env:PSModulePath -notlike "*$TestModulePath*") { | ||
$env:PSModulePath += "$([System.IO.Path]::PathSeparator)$TestModulePath" | ||
} | ||
} | ||
|
||
$originalPSMODULEPATH = $env:PSMODULEPATH | ||
$originalPSModulePath = $env:PSModulePath | ||
try { | ||
|
||
New-TestModule -Name 'Random' -Content @' | ||
|
@@ -67,7 +67,7 @@ Import-Module Random | |
} | ||
|
||
} finally { | ||
$env:PSMODULEPATH = $originalPSMODULEPATH | ||
$env:PSModulePath = $originalPSModulePath | ||
} | ||
|
||
} | ||
|
@@ -76,9 +76,9 @@ Describe 'Module reloading with Class definition' -Tags "CI" { | |
|
||
BeforeAll { | ||
Set-Content -Path TestDrive:\TestModule.psm1 -Value @' | ||
$passedArgs = $args | ||
class Root { $passedIn = $passedArgs } | ||
function Get-PassedArgsRoot { [Root]::new().passedIn } | ||
$passedArgs = $args | ||
class Root { $passedIn = $passedArgs } | ||
function Get-PassedArgsRoot { [Root]::new().passedIn } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't change anything here as PSModulePath isn't here. Not sure why this is showing up in the PR as a change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't see any whitespace difference either |
||
function Get-PassedArgsNoRoot { $passedArgs } | ||
'@ | ||
$Arg_Hello = 'Hello' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constants.PSModulePathEnvVar
- right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace changes - add
?w=1
to see the url to see diffs ignoring whitespace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a search for
"PSModulePath"
and I think I got them all