diff --git a/cmd/carapace/cmd/schema.go b/cmd/carapace/cmd/schema.go index a2146190e3..25f3f448ab 100644 --- a/cmd/carapace/cmd/schema.go +++ b/cmd/carapace/cmd/schema.go @@ -9,14 +9,10 @@ import ( ) var schemaCmd = &cobra.Command{ - Use: "--codegen spec", + Use: "--schema", Short: "json schema for spec files", Run: func(cmd *cobra.Command, args []string) { - if schema, err := spec.Schema(); err != nil { - fmt.Fprintln(cmd.ErrOrStderr(), err.Error()) // TODO fail / exit 1 ? - } else { - fmt.Fprintln(cmd.OutOrStdout(), schema) - } + fmt.Fprintln(cmd.OutOrStdout(), spec.Schema()) }, }