Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

put command discovery before scripts for Unix#5116

Merged
mirichmo merged 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:command-firstSteveL-MSFT/PowerShell:command-firstCopy head branch name to clipboard
Oct 24, 2017
Merged

put command discovery before scripts for Unix#5116
mirichmo merged 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:command-firstSteveL-MSFT/PowerShell:command-firstCopy head branch name to clipboard

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

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

Fix #2095

$env:PATH = $originalPath
}

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

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

Choose a reason for hiding this comment

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

Closed.

@iSazonov iSazonov left a comment

Copy link
Copy Markdown
Collaborator

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.

@anmenaga anmenaga left a comment

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Member Author

@mirichmo can you merge?

@daxian-dbw

Copy link
Copy Markdown
Member

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

@mirichmo

Copy link
Copy Markdown
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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.