server/perkeepd: don't ignore error from serverinit.WriteDefaultConfigFile

Fixes #1154

Change-Id: I1b35ab70ef3ad20fa8527a074485661a36b04e52
This commit is contained in:
Brad Fitzpatrick 2018-05-09 20:51:42 -07:00
parent d50667a178
commit e22801a8ab
1 changed files with 3 additions and 2 deletions

View File

@ -191,9 +191,10 @@ func loadConfig(arg string) (conf *serverinit.Config, isNewConfig bool, err erro
return
}
log.Printf("Generating template config file %s", absPath)
if err = serverinit.WriteDefaultConfigFile(absPath, sqlite.CompiledIn()); err == nil {
isNewConfig = true
if err = serverinit.WriteDefaultConfigFile(absPath, sqlite.CompiledIn()); err != nil {
return
}
isNewConfig = true
}
case filepath.IsAbs(arg):
absPath = arg