From c1a81c6fe3e56e7e185a890cb30a5e57462e9a3f Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Mon, 11 Mar 2024 15:21:57 -0700 Subject: [PATCH] Use stdin for term discovery on windows When you feed input to the cmd via a pipe it no longer reports a warning --- cmd/cmd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index b9afb2e2..51787348 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -900,8 +900,7 @@ func NewCLI() *cobra.Command { cobra.EnableCommandSorting = false if runtime.GOOS == "windows" { - // Enable colorful ANSI escape code in Windows terminal (disabled by default) - console.ConsoleFromFile(os.Stdout) //nolint:errcheck + console.ConsoleFromFile(os.Stdin) //nolint:errcheck } rootCmd := &cobra.Command{