dotnet / dotnet/command-line-api

Location can't be both implicit and explicit

Open
#2,437 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

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.

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.