Skip to content

Commit e1bf3f5

Browse files
Fixed NRT error
1 parent de81c7b commit e1bf3f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/System.CommandLine/Parsing/CliCommandResultInternal.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ public CliCommandResult CommandResult
4747
if (commandResult is null)
4848
{
4949
var parent = Parent is CliCommandResultInternal commandResultInternal
50-
? commandResultInternal.CommandResult
50+
? commandResultInternal.CommandResult
5151
: null;
52-
// TODO: Resolve the NRT warning for locations
53-
commandResult = new CliCommandResult(Command, parent?.Locations, parent);
52+
commandResult = new CliCommandResult(Command, Tokens.Select(t => t.Location), parent);
5453
}
5554
// Reset unless we put tests in place to ensure it is not called in error handling before SymbolTree processing is complete
5655
commandResult.ValueResults = Children.Select(GetValueResult).OfType<CliValueResult>().ToList();

0 commit comments

Comments
 (0)