posh-git icon indicating copy to clipboard operation
posh-git copied to clipboard

Prevent PowerShell 7.3 from breaking tests

Open DominikJaniec opened this issue 1 year ago • 3 comments

With PowerShell 7.3 the $PSNativeCommandArgumentPassing becomes 'Standard'. It will break a few tests using test-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:

> echo.exe "magic `"str`" quoted"
magic str quoted

This PR is a solution for an issue risen recently by me: https://github.com/dahlbyk/posh-git/issues/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 version 7.2.10, or the same version is in Ubuntu 22.04.

DominikJaniec avatar Mar 03 '23 22:03 DominikJaniec