Use stdin for term discovery on windows

When you feed input to the cmd via a pipe it no longer reports a warning
This commit is contained in:
Daniel Hiltgen 2024-03-11 15:21:57 -07:00
parent e72c567cfd
commit c1a81c6fe3

View file

@ -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{