From 51301f87823b0d8c377fb079366a3e7f5838081e Mon Sep 17 00:00:00 2001 From: Roshan Padaki Date: Wed, 13 Apr 2022 10:57:41 -0400 Subject: [PATCH] Fix table printer crashing in narrow terminals (#5449) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mislav Marohnić --- utils/table_printer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/table_printer.go b/utils/table_printer.go index 9a40cdbbc..80af79db1 100644 --- a/utils/table_printer.go +++ b/utils/table_printer.go @@ -204,7 +204,7 @@ func (t *ttyTablePrinter) calculateColumnWidths(delimSize int) []int { } if max := maxColWidths[col]; max < perColumn { colWidths[col] = max - } else { + } else if perColumn > 0 { colWidths[col] = perColumn } }