Skip to content

Commit

Permalink
add SilenceUsage and SilenceErrors
Browse files Browse the repository at this point in the history
Signed-off-by: luyanbo <[email protected]>
  • Loading branch information
robberphex committed Sep 15, 2021
1 parent 9d701db commit 8093426
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/limactl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ func main() {

func newApp() *cobra.Command {
var rootCmd = &cobra.Command{
Use: "limactl",
Short: "Lima: Linux virtual machines",
Version: strings.TrimPrefix(version.Version, "v"),
Use: "limactl",
Short: "Lima: Linux virtual machines",
Version: strings.TrimPrefix(version.Version, "v"),
SilenceUsage: true,
SilenceErrors: true,
}
rootCmd.PersistentFlags().Bool("debug", false, "debug mode")
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit 8093426

Please sign in to comment.