--debug now requires --cache, exits with error if not provided
This commit is contained in:
parent
5fdfaee80d
commit
5beb1fc858
|
@ -27,6 +27,11 @@ var (
|
|||
Use: "roulette <path> [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 {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Version = "0.43.0"
|
||||
var Version = "0.43.1"
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
|
Loading…
Reference in New Issue