-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Conversation
@@ -734,8 +734,8 @@ private static bool NeedToClearProcessModulePath(string currentProcessModulePath | |||
// so if the current process module path contains any of them, it's likely that the sxs | |||
// ps was started directly on windows, or from full ps. The same goes for the legacy personal | |||
// and shared module paths. | |||
string hklmModulePath = GetExpandedEnvironmentVariable("PSMODULEPATH", EnvironmentVariableTarget.Machine); | |||
string hkcuModulePath = GetExpandedEnvironmentVariable("PSMODULEPATH", EnvironmentVariableTarget.User); | |||
string hklmModulePath = GetExpandedEnvironmentVariable("PSModulePath", EnvironmentVariableTarget.Machine); |
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.
I count 8 references to this same string in code - there should be a const string
that we use instead.
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.
ok
@@ -1,3 +1,4 @@ | |||
return |
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.
It seems we should remove.
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.
that was accidentally committed as those tests were failing due to external issue, will remove
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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see any whitespace difference either
make "PSModulePath" into const fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in
@@ -518,11 +518,11 @@ internal override string GetModulePath(PropertyScope scope) | |||
{ | |||
if (PropertyScope.CurrentUser == scope) | |||
{ | |||
return ModuleIntrinsics.GetExpandedEnvironmentVariable("PSMODULEPATH", EnvironmentVariableTarget.User); | |||
return ModuleIntrinsics.GetExpandedEnvironmentVariable("PSModulePath", EnvironmentVariableTarget.User); |
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
make "PSModulePath" into const fixed some test workarounds due to failures for external reasons that wasn't meant to be checked in
@TravisEz13 merge? |
addresses #3227