Note:
Steps to reproduce
# NOTE:
# * Problem shows if `pwsh` was installed via `dotnet tool --global`
# * Run from *cmd.exe* or *bash*
pwsh -noprofile -c "write-output 1 \"2 3\""
Expected behavior
That is, the escaped embedded double quotes (\") should be honored, resulting in two outputs, 1, and '2 3'.
This is indeed what happens with a regularly installed version.
Actual behavior
This output suggests that the embedded escaped double quotes (\") were unexpectedly eaten.
Environment data
PowerShell Core 7.0 # as a global .NET tool, all platforms
Note:
This problem was discovered by @gerardog, and this issue is meant to supersede CLI: escaped command line quotes "" difference with powershell 5.1 #11569
It only affects PowerShell when installed as a .NET global tool:
dotnet tool install --global PowerShellSteps to reproduce
Expected behavior
That is, the escaped embedded double quotes (
\") should be honored, resulting in two outputs,1, and'2 3'.This is indeed what happens with a regularly installed version.
Actual behavior
This output suggests that the embedded escaped double quotes (
\") were unexpectedly eaten.Environment data