Do not move forward if there is parsing error
This commit is contained in:
parent
6fdc98c23b
commit
9c1fa7c9d9
3 changed files with 52 additions and 3 deletions
|
@ -167,7 +167,12 @@ namespace Microsoft.DotNet.Cli
|
|||
int exitCode;
|
||||
if (BuiltInCommandsCatalog.Commands.TryGetValue(command, out var builtIn))
|
||||
{
|
||||
TelemetryEventEntry.SendFiltered(Parser.Instance.ParseFrom($"dotnet {command}", appArgs.ToArray()));
|
||||
var parseResult = Parser.Instance.ParseFrom($"dotnet {command}", appArgs.ToArray());
|
||||
if (!parseResult.Errors.Any())
|
||||
{
|
||||
TelemetryEventEntry.SendFiltered(parseResult);
|
||||
}
|
||||
|
||||
exitCode = builtIn.Command(appArgs.ToArray());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue