You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a quoted string starts with a hyphen and a space, the character following the space is interpreted as a flag. For example some-command '- http' is interpreted as some-command -h and shows help information for the command.
If FParseErrWhitelist.UnknownFlags is set to false, an error is displayed which implies the space is being interpreted as a flag as well:
Error: unknown shorthand flag: ' ' in - h
I don't think whitespace is a valid flag name so this seems like a bug to me. It can likely be avoided with a simple condition in the flag parsing:
For '- ', if unicode.IsSpace(rune(arg[1])), treat it as an argument
For '-- ', if unicode.IsSpace(rune(arg[2])), treat it as an argument