GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — put command discovery before scripts for Unix by SteveL-MSFT · Pull Request #5116 · PowerShell/PowerShell

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 14, 2017

Copy link
Copy Markdown
Member

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

Fix #2095

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andyleejordan reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@SteveL-MSFT
put command discovery before scripts for Unix
1f79c1e
@SteveL-MSFT Steve Lee (SteveL-MSFT) assigned Mike Richmond (mirichmo) Oct 14, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Andrew (anmenaga) and Dongbo Wang (daxian-dbw) October 14, 2017 05:44
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Bruce Payette (BrucePay), Jason Shirk (lzybkr) and sergei (vors) as code owners October 14, 2017 05:44
iSazonov
Ilya (iSazonov) reviewed Oct 14, 2017
View reviewed changes
Comment thread test/powershell/Language/Scripting/NativeExecution/NativeLinuxCommands.Tests.ps1 Outdated
$env:PATH = $originalPath
}

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

@iSazonov Ilya (iSazonov) Oct 14, 2017

Copy link
Copy Markdown
Collaborator

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.

Now we skip the test - why?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Oct 14, 2017

Copy link
Copy Markdown
Member Author

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Oct 14, 2017

Copy link
Copy Markdown
Collaborator

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.

Closed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
iSazonov
Ilya (iSazonov) approved these changes Oct 14, 2017
View reviewed changes

@iSazonov Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

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.

LGTM with one minor comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT
remove unnecessary test
c2f3013
anmenaga
Andrew (anmenaga) approved these changes Oct 17, 2017
View reviewed changes

@anmenaga Andrew (anmenaga) left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 17, 2017

Copy link
Copy Markdown
Member Author

Andrew (@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Oct 21, 2017

Copy link
Copy Markdown
Member Author

Mike Richmond (@mirichmo) can you merge?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw

Dongbo Wang (daxian-dbw) commented Oct 23, 2017

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mirichmo
Mike Richmond (mirichmo) approved these changes Oct 24, 2017
View reviewed changes
@mirichmo

Mike Richmond (mirichmo) commented Oct 24, 2017

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) The code is guarded by a runtime Platform check.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mirichmo
Mike Richmond (mirichmo) merged commit d85b9a4 into PowerShell:master Oct 24, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the command-first branch November 12, 2017 05:17
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@SteveL-MSFT @mirichmo
Put command discovery before scripts for Unix (PowerShell#5116)
0f9142c
* put command discovery before scripts for Unix

* remove unnecessary test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov approved these changes
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@lzybkr Jason Shirk (lzybkr) Awaiting requested review from lzybkr
@vors sergei (vors) Awaiting requested review from vors
+2 more reviewers
@anmenaga Andrew (anmenaga) anmenaga approved these changes
@mirichmo Mike Richmond (mirichmo) mirichmo approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mirichmo Mike Richmond (mirichmo)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@SteveL-MSFT @daxian-dbw @mirichmo @anmenaga @iSazonov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.