Skip to content

Commit 663405c

Browse files
akshayjshahkyleconroy
authored andcommitted
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`.
1 parent 2912dda commit 663405c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/cmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func Do(args []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) int
2929

3030
rootCmd.SetArgs(args)
3131
rootCmd.SetIn(stdin)
32-
rootCmd.SetErr(stderr)
32+
rootCmd.SetOut(stdout)
3333
rootCmd.SetErr(stderr)
3434

3535
err := rootCmd.Execute()

0 commit comments

Comments
 (0)