mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 19:34:19 +00:00
make sure app exits after error in --sections argument
This commit is contained in:
parent
07fe366c15
commit
efbef83362
1 changed files with 1 additions and 0 deletions
1
app.go
1
app.go
|
@ -240,6 +240,7 @@ func Serve() {
|
||||||
for _, element := range configSectionsArray {
|
for _, element := range configSectionsArray {
|
||||||
if element != "server" && element != "db" && element != "app" {
|
if element != "server" && element != "db" && element != "app" {
|
||||||
log.Error("Invalid argument to --sections. Valid arguments are only \"server\", \"db\" and \"app\"")
|
log.Error("Invalid argument to --sections. Valid arguments are only \"server\", \"db\" and \"app\"")
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d, err := config.Configure(app.cfgFile, *configSections)
|
d, err := config.Configure(app.cfgFile, *configSections)
|
||||||
|
|
Loading…
Reference in a new issue