Commit 7da91793 authored by Andy Cobaugh's avatar Andy Cobaugh

root: add quiet flag

parent 8919b596
......@@ -46,7 +46,9 @@ var rootCmd = &cobra.Command{
cmd.HelpFunc()(cmd, args)
},
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PrintLogo()
if !viper.GetBool("quiet") {
PrintLogo()
}
},
SilenceUsage: true,
}
......@@ -73,6 +75,7 @@ func init() {
// 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")
rootCmd.Flags().BoolP("quiet", "q", false, "Suppress printing of extraneous info, including the logo")
}
// initConfig reads in config file and ENV variables if set.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment