8000 corrected use of PSModulePath casing to be consistent with Windows PowerShell by SteveL-MSFT · Pull Request #3255 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 4 commits into from
Mar 15, 2017

Conversation

SteveL-MSFT
Copy link
Member

addresses #3227

@@ -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);
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Collaborator

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.

Copy link
Member Author

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 }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's changed?

Copy link
Member Author

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.

Copy link
Member Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constants.PSModulePathEnvVar - right?

Copy link
Contributor

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.

Copy link
Member Author

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
@SteveL-MSFT
Copy link
Member Author

@TravisEz13 merge?

@TravisEz13 TravisEz13 merged commit 76de340 into PowerShell:master Mar 15, 2017
@SteveL-MSFT SteveL-MSFT deleted the psmodulepath branch March 21, 2017 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0