Skip to content

Commit

Permalink
Set stdout correctly (#232)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
akshayjshah authored and kyleconroy committed Jan 7, 2020
1 parent 2912dda commit 663405c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 663405c

Please sign in to comment.