Skip to content
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

put command discovery before scripts for Unix #5116

Merged
merged 2 commits into from
Oct 24, 2017

Conversation

SteveL-MSFT
Copy link
Member

Also cleaned up the NativeLinuxCommands.Tests.ps1 script on skipping tests

Fix #2095

$global:PSDefaultParameterValues = $originalDefaultParams
$env:PATH = $originalPath
}

It "Should return a type of 'string' for hostname cmdlet" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now we skip the test - why?

Copy link
Member Author

Choose a reason for hiding this comment

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

This test was created a long time ago. I think it's actually not useful and is implicitly covered by tests that follow. I'll remove it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Closed.

Copy link
Collaborator

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

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

LGTM with one minor comment.

Copy link
Contributor

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

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

LGTM
Why adding testdrive to $env:PATH is necessary?

@SteveL-MSFT
Copy link
Member Author

@anmenaga I was thinking that would be a good way for command discovery to find the "native command" and the powershell script to validate the command was executed over the script without polluting the current working directory.

@SteveL-MSFT
Copy link
Member Author

@mirichmo can you merge?

@daxian-dbw
Copy link
Member

Is this change only for Unix? The title seems so but the change is not guarded by #if UNIX.

@mirichmo
Copy link
Member

@daxian-dbw The code is guarded by a runtime Platform check.

@mirichmo mirichmo merged commit d85b9a4 into PowerShell:master Oct 24, 2017
@SteveL-MSFT SteveL-MSFT deleted the command-first branch November 12, 2017 05:17
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.

None yet

5 participants