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:
parent
e72c567cfd
commit
c1a81c6fe3
1 changed files with 1 additions and 2 deletions
|
@ -900,8 +900,7 @@ func NewCLI() *cobra.Command {
|
||||||
cobra.EnableCommandSorting = false
|
cobra.EnableCommandSorting = false
|
||||||
|
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
// Enable colorful ANSI escape code in Windows terminal (disabled by default)
|
console.ConsoleFromFile(os.Stdin) //nolint:errcheck
|
||||||
console.ConsoleFromFile(os.Stdout) //nolint:errcheck
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rootCmd := &cobra.Command{
|
rootCmd := &cobra.Command{
|
||||||
|
|
Loading…
Add table
Reference in a new issue