diff --git a/cmd/gocert/main.go b/cmd/gocert/main.go index 115b665..d3ce4e6 100644 --- a/cmd/gocert/main.go +++ b/cmd/gocert/main.go @@ -10,7 +10,7 @@ import ( ) func main() { - log.SetOutput(os.Stderr) + log.SetOutput(os.Stdout) configFilePtr := flag.String("config", "", "The config file to be provided to the server") flag.Parse() if *configFilePtr == "" { diff --git a/cmd/gocert/main_test.go b/cmd/gocert/main_test.go index 3b62a2e..e33cd4f 100644 --- a/cmd/gocert/main_test.go +++ b/cmd/gocert/main_test.go @@ -151,13 +151,13 @@ func TestGoCertFail(t *testing.T) { } flag.CommandLine = flag.NewFlagSet(tc.Name, flag.ExitOnError) cmd := exec.Command("gocert", tc.Args...) - stderr, _ := cmd.StderrPipe() + stdout, _ := cmd.StdoutPipe() if err := cmd.Start(); err != nil { t.Errorf("Failed running command") } - slurp, _ := io.ReadAll(stderr) + slurp, _ := io.ReadAll(stdout) if err := cmd.Wait(); err == nil { t.Errorf("Command did not fail")