File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/System.CommandLine/Help Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -238,12 +238,13 @@ protected virtual void AppendHelpItems(IReadOnlyCollection<HelpItem> helpItems)
238
238
/// <returns>
239
239
/// A table of strings whose elements are the projection of the collection with whitespace formatting removed.
240
240
/// </returns>
241
- protected virtual IEnumerable < IReadOnlyList < string > > CreateTable < T > ( IEnumerable < T > collection , Func < T , IEnumerable < string > > selector )
241
+ protected virtual IReadOnlyList < IReadOnlyList < string > > CreateTable < T > ( IEnumerable < T > collection , Func < T , IEnumerable < string > > selector )
242
242
{
243
243
return collection . Select ( selector )
244
244
. Select ( row => row
245
245
. Select ( element => ShortenWhitespace ( element ) )
246
- . ToArray ( ) ) ;
246
+ . ToList ( ) )
247
+ . ToList ( ) ;
247
248
}
248
249
249
250
/// <summary>
@@ -737,9 +738,13 @@ private bool ShouldDisplayArgumentHelp(ICommand? command)
737
738
private int GetConsoleWindowWidth ( IConsole console )
738
739
{
739
740
if ( console is SystemConsole systemConsole )
741
+ {
740
742
return systemConsole . GetConsoleWindowWidth ( ) ;
743
+ }
741
744
else
745
+ {
742
746
return int . MaxValue ;
747
+ }
743
748
}
744
749
745
750
private string ShortenWhitespace ( string input )
You can’t perform that action at this time.
0 commit comments