command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Location can't be both implicit and explicit

Open PonchoPowers opened this issue 1 year ago • 0 comments

The following code exists in the Tokenizer.Tokenize method:

var rootIsExplicit = FirstArgIsRootCommand(args, rootCommand, inferRootCommand);
var rootLocation = Location.CreateRoot(rootCommand.Name, rootIsExplicit, rootIsExplicit ? 0 : -1);

Keep in mind that rootIsExplicit specifies "Explicit".

The Location.CreateRoot method signature is as follows:

internal static Location CreateRoot(string exeName, bool isImplicit, int start)

Note that it is asking if the location is "Implicit".

There appears to be a discrepancy between whether the location is implicit or explicit.

PonchoPowers avatar Jun 07 '24 02:06 PonchoPowers