Skip to content

Commit cf7a861

Browse files
Keboojonsequitur
authored andcommitted
When an explicit max width is specified don't override with the terminal's width
1 parent 759e1bf commit cf7a861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.CommandLine/CommandLineConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public CommandLineConfiguration(
5555
internal static HelpBuilder DefaultHelpBuilderFactory(BindingContext context, int? requestedMaxWidth = null)
5656
{
5757
int maxWidth = requestedMaxWidth ?? int.MaxValue;
58-
if (context.Console is SystemConsole systemConsole)
58+
if (requestedMaxWidth is null && context.Console is SystemConsole systemConsole)
5959
{
6060
maxWidth = systemConsole.GetWindowWidth();
6161
}

0 commit comments

Comments
 (0)