Skip to content

Commit

Permalink
🐛 Error message was shown twice
Browse files Browse the repository at this point in the history
This was happening bc cobra prints the error and gut was printing too
  • Loading branch information
julien040 committed Dec 31, 2022
1 parent be89dcd commit 1867fae
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ THE SOFTWARE.
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
Expand All @@ -46,19 +45,10 @@ Our goal is not to replace git, but to make it easier to use for the most common
func Execute() {
err := rootCmd.Execute()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}

func init() {
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.

// rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.gut.yaml)")

// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

0 comments on commit 1867fae

Please sign in to comment.