浏览代码

Merge pull request #3068 from dhiltgen/win_pipe

Use stdin for term discovery on windows
Daniel Hiltgen 1 年之前
父节点
当前提交
da20786e3e
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      cmd/cmd.go

+ 1 - 2
cmd/cmd.go

@@ -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.Stdout) //nolint:errcheck
+		console.ConsoleFromFile(os.Stdin) //nolint:errcheck
 	}
 	}
 
 
 	rootCmd := &cobra.Command{
 	rootCmd := &cobra.Command{