diff --git a/cmd/image/commands.go b/cmd/image/commands.go index 80c0865..19db523 100644 --- a/cmd/image/commands.go +++ b/cmd/image/commands.go @@ -7,7 +7,12 @@ import ( ) func Command() *cobra.Command { - imageCmd := &cobra.Command{Use: "image", Short: "Manage macOS disk images (reuses cocoon's cloudimg store)"} // --state-dir is a root persistent flag + imageCmd := &cobra.Command{ + Use: "image", + Short: "Manage macOS disk images (reuses cocoon's cloudimg store)", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Help() }, + } pull := &cobra.Command{ Use: "pull REF", diff --git a/cmd/vm/commands.go b/cmd/vm/commands.go index b9829f7..e91d72c 100644 --- a/cmd/vm/commands.go +++ b/cmd/vm/commands.go @@ -7,7 +7,12 @@ import ( ) func Command() *cobra.Command { - vmCmd := &cobra.Command{Use: "vm", Short: "Manage macOS VMs"} // --state-dir is a root persistent flag + vmCmd := &cobra.Command{ + Use: "vm", + Short: "Manage macOS VMs", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Help() }, + } createCmd := &cobra.Command{ Use: "create [flags] IMAGE",