From 8c9c326342f6499bc3e613b054ed81a21f8c9399 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Thu, 11 Jun 2020 10:14:33 +1000 Subject: [PATCH] Usage error messages now go to StdErr --- cmd/read.go | 1 + cmd/root.go | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/read.go b/cmd/read.go index 64e8902..9039b90 100644 --- a/cmd/read.go +++ b/cmd/read.go @@ -57,6 +57,7 @@ func readProperty(cmd *cobra.Command, args []string) error { } if errorReadingStream != nil { + cmd.SilenceUsage = true return errorReadingStream } out := cmd.OutOrStdout() diff --git a/cmd/root.go b/cmd/root.go index a2def3b..95aae99 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -55,7 +55,5 @@ func New() *cobra.Command { createNewCmd(), createMergeCmd(), ) - rootCmd.SetOutput(os.Stdout) - return rootCmd }