dotnet / dotnet/command-line-api

Use 'CommandLineStringSplitter.Instance.Split' parse bug.

Open
#1,740 5 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

```c#
var raw = "\"dotnet publish \\\"xxx.csproj\\\" -c Release -o \\\"./bin/latest/\\\" -r linux-x64 --self-contained false\"";

var array = System.CommandLine.Parsing.CommandLineStringSplitter.Instance.Split(raw).ToArray();

Console.WriteLine(array.Length);
```

Its parsed array:

1. "dotnet publish \\"
2. "xxx.csproj\\ -c Release -o \\./bin/latest\\ -r linux-x64 --self-contained false"

But expected array like:

1. "dotnet publish \\"xxx.csproj\\" -c Release -o \\"./bin/latest\\" -r linux-x64 --self-contained false"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.