From: Hyungju Lee Date: Wed, 2 Aug 2023 04:01:27 +0000 (+0900) Subject: [Tizen] Patch for console output not redirected but window width is 0 X-Git-Tag: accepted/tizen/unified/riscv/20231226.055542~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47dd966c9a8e65ae15a4390d646cd00c3d7b985c;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tizen] Patch for console output not redirected but window width is 0 --- diff --git a/src/Tools/Common/Commands/ProcessStatus.cs b/src/Tools/Common/Commands/ProcessStatus.cs index 2c5c14187..29d840d16 100644 --- a/src/Tools/Common/Commands/ProcessStatus.cs +++ b/src/Tools/Common/Commands/ProcessStatus.cs @@ -87,7 +87,7 @@ namespace Microsoft.Internal.Common.Commands } else { - consoleWidth = Console.WindowWidth; + consoleWidth = Console.WindowWidth > 0 ? Console.WindowWidth : Int32.MaxValue; } int extra = (int)Math.Ceiling(consoleWidth * 0.05); int largeLength = consoleWidth / 2 - 16 - extra; @@ -108,7 +108,7 @@ namespace Microsoft.Internal.Common.Commands int iDLength = GetColumnWidth(processIDs); int nameLength = GetColumnWidth(processNames); int fileLength = GetColumnWidth(fileNames); - int cmdLength = GetColumnWidth(commandLineArgs); + int cmdLength = Math.Min(GetColumnWidth(commandLineArgs), 128); foreach (ProcessDetails info in rows) {