-
-
Notifications
You must be signed in to change notification settings - Fork 803
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
Prevent PowerShell 7.3 from breaking tests #951
base: master
Are you sure you want to change the base?
Conversation
e8b5b2e
to
a9447e1
Compare
Strangely, everything passed 😕 Maybe, Nonetheless, next commit solved problems on my machine 😅 |
|
||
if (-not (Test-Path Variable:PSNativeCommandArgumentPassing) ` | ||
-or $PSNativeCommandArgumentPassing -eq 'Legacy') { | ||
$value = $value.Replace("`"", "\`"") |
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.
I've debated with oneself, if explicit version should be used here:
$value = $value.Replace("`"", "\`"") | |
$value = "!f() { exec vsts code pr \`"`$`@\`"; }; f" |
I hope, this will be useful, once workflows would run on |
Any update on this? I'm missing my posh-git! |
With
PowerShell 7.3
the$PSNativeCommandArgumentPassing
becomes'Standard'
. It will break a few tests usingtest-vsts-pr
alias. In previous versions of PowerShell, this was set or assumed as'Legacy'
, and now it will become'Windows'
on that, and'Standard'
everywhere else.The
'Legacy'
, as well as the'Windows'
for certain system-ish executables, makes that:This PR is a solution for an issue risen recently by me: #950
My first commit should break mentioned tests, and it could be reverted once GitHub workflows start running on
PowerShell 7.3
. Currently, e.g. image used for Windows 2022 has installed version7.2.10
, or the same version is in Ubuntu 22.04.