From d395dae3a875fb248b6fcc1abe705064d422d057 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Mon, 6 Sep 2021 15:17:24 -0400 Subject: [PATCH] don't double-print errors --- cmd/ghcs/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/ghcs/main.go b/cmd/ghcs/main.go index 2f1515ac0..3e861dacb 100644 --- a/cmd/ghcs/main.go +++ b/cmd/ghcs/main.go @@ -19,8 +19,9 @@ func main() { var version = "DEV" var rootCmd = &cobra.Command{ - Use: "ghcs", - SilenceUsage: true, // don't print usage message after each error (see #80) + Use: "ghcs", + SilenceUsage: true, // don't print usage message after each error (see #80) + SilenceErrors: false, // print errors automatically so that main need not Long: `Unofficial CLI tool to manage GitHub Codespaces. Running commands requires the GITHUB_TOKEN environment variable to be set to a @@ -43,5 +44,4 @@ func explainError(w io.Writer, err error) { fmt.Fprintln(w, "Make sure to enable SSO for your organizations after creating the token.") return } - fmt.Fprintf(w, "%v\n", err) }