Skip to content

Commit

Permalink
add SilenceUsage and SilenceErrors
Browse files Browse the repository at this point in the history
Signed-off-by: luyanbo <robert.lyb@alibaba-inc.com>
  • Loading branch information
robberphex committed Sep 16, 2021
1 parent ccca135 commit 973104b
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 973104b

Please sign in to comment.