Skip to content

Commit b5556e9

Browse files
authored
Added condition for writing an extra newline in WriteTypoCorrectionSuggestions. (#2289)
1 parent fb9d8c2 commit b5556e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/System.CommandLine/Invocation/ParseErrorAction.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ private static void WriteTypoCorrectionSuggestions(ParseResult parseResult)
104104
}
105105
}
106106

107-
parseResult.Configuration.Output.WriteLine();
107+
if (unmatchedTokens.Count != 0)
108+
{
109+
parseResult.Configuration.Output.WriteLine();
110+
}
108111

109112
static IEnumerable<string> GetPossibleTokens(CliCommand targetSymbol, string token)
110113
{

0 commit comments

Comments
 (0)