diff --git a/cmd/root.go b/cmd/root.go index 78ea90c..f9d08d4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,6 +5,7 @@ Copyright © 2022 Seednode package cmd import ( + "fmt" "os" "github.com/spf13/cobra" @@ -19,7 +20,11 @@ var rootCmd = &cobra.Command{ Short: "Serves random images from the specified directories.", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - ServePage(args) + err := ServePage(args) + if err != nil { + fmt.Println(err) + os.Exit(1) + } }, } diff --git a/cmd/version.go b/cmd/version.go index 08d3ee0..58dec6c 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.14.1" +var Version = "0.14.2" func init() { rootCmd.AddCommand(versionCmd)