-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Conversation
$global:PSDefaultParameterValues = $originalDefaultParams | ||
$env:PATH = $originalPath | ||
} | ||
|
||
It "Should return a type of 'string' for hostname cmdlet" { |
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?
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.
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.
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.
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?
@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. |
@mirichmo can you merge? |
Is this change only for Unix? The title seems so but the change is not guarded by |
@daxian-dbw The code is guarded by a runtime Platform check. |
Also cleaned up the NativeLinuxCommands.Tests.ps1 script on skipping tests
Fix #2095