dotnet / dotnet/command-line-api

Empty flags cannibalize each other

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

Description

Flag with value of an empty string ruins the entire command line input.

For example:

-o, with an empty string (""), will skip over it and grab the next flag.
`-o "" -q "&color=red"`

This makes -o contain "-q". "&color=red" then gets thrown away, because the '-q' flag never got called. This then causes cascading issues.

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.