-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the buildIn-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
Description
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 PowerShell- Note: You need a .NET Core SDK 3.1 installation first.
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
1
2 3
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
1
2
3
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
haltcase, GennadyGS and ForNeVeRhaltcasehaltcase
Metadata
Metadata
Assignees
Labels
Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the buildIn-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more