diff --git a/cmd/root.go b/cmd/root.go index d8f836a..6478541 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,6 +27,11 @@ var ( Use: "roulette [path]...", Short: "Serves random images from the specified directories.", Args: cobra.MinimumNArgs(1), + PreRun: func(cmd *cobra.Command, args []string) { + if debug { + cmd.MarkFlagRequired("cache") + } + }, RunE: func(cmd *cobra.Command, args []string) error { err := ServePage(args) if err != nil { diff --git a/cmd/version.go b/cmd/version.go index 60240f3..1b125bc 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.43.0" +var Version = "0.43.1" func init() { rootCmd.AddCommand(versionCmd)