Skip to content

Use 'CommandLineStringSplitter.Instance.Split' parse bug. #1740

@treenewlyn

Description

@treenewlyn
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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions