Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

addresses #3227

// 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
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