diff --git a/cmd/root.go b/cmd/root.go index 3da7ada..57e2cbb 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "3.1.0" + ReleaseVersion string = "3.2.0" ) var ( @@ -119,6 +119,8 @@ func init() { rootCmd.CompletionOptions.HiddenDefaultCmd = true + rootCmd.MarkFlagsOneRequired("audio", "code", "flash", "images", "text", "video") + rootCmd.SilenceErrors = true rootCmd.SetHelpCommand(&cobra.Command{ Hidden: true, diff --git a/cmd/web.go b/cmd/web.go index a75bc26..7833d2a 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -483,9 +483,7 @@ func ServePage(args []string) error { formats.Add(video.Format{}) } - // enable image support if no other flags are passed, to retain backwards compatibility - // to be replaced with rootCmd.MarkFlagsOneRequired on next spf13/cobra update - if Images || All || len(formats) == 0 { + if Images || All { formats.Add(images.Format{DisableButtons: DisableButtons, Fun: Fun}) }