set default value and fail hard on miss-config

This commit is contained in:
6543 2023-02-11 03:49:24 +01:00
parent e6befc48c8
commit ee6c921ac1
No known key found for this signature in database
GPG Key ID: B8BE6D610E61C862
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ var (
Name: "pages-branch",
Usage: "define a branch to fetch assets from",
EnvVars: []string{"PAGES_BRANCHES"},
Value: &cli.StringSlice{},
Value: cli.NewStringSlice("pages"),
},
// ############################

View File

@ -63,7 +63,7 @@ func Serve(ctx *cli.Context) error {
}
if len(defaultBranches) == 0 {
defaultBranches = []string{"pages"}
return fmt.Errorf("no default branches set (PAGES_BRANCHES)")
}
// Init ssl cert database