From 663405c504ebb850b3546deb8bf5dbe699542344 Mon Sep 17 00:00:00 2001 From: Akshay Shah Date: Tue, 7 Jan 2020 15:32:21 -0800 Subject: [PATCH] Set stdout correctly (#232) The `cmd.Do` function takes a writer to use as standard out, but doesn't use it. Instead, there's a duplicate call to `cobra.Command.SetErr`. This patch replaces one of the duplicates with `SetOut`. --- internal/cmd/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 361c1484e3..d555de39b2 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -29,7 +29,7 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int rootCmd.SetArgs(args) rootCmd.SetIn(stdin) - rootCmd.SetErr(stderr) + rootCmd.SetOut(stdout) rootCmd.SetErr(stderr) err := rootCmd.Execute()