mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-06-20 01:50:55 +02:00
set default value and fail hard on miss-config
This commit is contained in:
parent
e6befc48c8
commit
ee6c921ac1
|
@ -109,7 +109,7 @@ var (
|
||||||
Name: "pages-branch",
|
Name: "pages-branch",
|
||||||
Usage: "define a branch to fetch assets from",
|
Usage: "define a branch to fetch assets from",
|
||||||
EnvVars: []string{"PAGES_BRANCHES"},
|
EnvVars: []string{"PAGES_BRANCHES"},
|
||||||
Value: &cli.StringSlice{},
|
Value: cli.NewStringSlice("pages"),
|
||||||
},
|
},
|
||||||
|
|
||||||
// ############################
|
// ############################
|
||||||
|
|
|
@ -63,7 +63,7 @@ func Serve(ctx *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(defaultBranches) == 0 {
|
if len(defaultBranches) == 0 {
|
||||||
defaultBranches = []string{"pages"}
|
return fmt.Errorf("no default branches set (PAGES_BRANCHES)")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init ssl cert database
|
// Init ssl cert database
|
||||||
|
|
Loading…
Reference in New Issue
Block a user