From 32b332b7980c4bf9a58b4e7d3e3b125b5d9fbcc0 Mon Sep 17 00:00:00 2001 From: Hyungju Lee Date: Wed, 2 Aug 2023 13:01:27 +0900 Subject: [PATCH] [Tizen] Patch for console output not redirected but window width is 0 --- src/Tools/Common/Commands/ProcessStatus.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tools/Common/Commands/ProcessStatus.cs b/src/Tools/Common/Commands/ProcessStatus.cs index 9a83d7c71..270ff040b 100644 --- a/src/Tools/Common/Commands/ProcessStatus.cs +++ b/src/Tools/Common/Commands/ProcessStatus.cs @@ -88,7 +88,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; @@ -109,7 +109,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(var info in rows) { -- 2.34.1