From fc8023b9418629c31b3e83b72f33816b5f9219cb Mon Sep 17 00:00:00 2001 From: jon4hz Date: Tue, 14 Mar 2023 17:02:12 +0100 Subject: [PATCH] fix: dont get size of cygwin terminals --- cli/packages/visualize/visualize.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/packages/visualize/visualize.go b/cli/packages/visualize/visualize.go index 6ec762c9b..8599f2405 100644 --- a/cli/packages/visualize/visualize.go +++ b/cli/packages/visualize/visualize.go @@ -31,9 +31,11 @@ const ( // Given headers and rows, this function will print out a table func Table(headers [3]string, rows [][3]string) { - // if we're not in a terminal, don't truncate the secret value - shouldTruncate := isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd()) + // if we're not in a terminal or cygwin terminal, don't truncate the secret value + shouldTruncate := isatty.IsTerminal(os.Stdout.Fd()) + // This will return an error if we're not in a terminal or + // if the terminal is a cygwin terminal like Git Bash. width, _, err := term.GetSize(int(os.Stdout.Fd())) if err != nil { if shouldTruncate {