Download update index if not available

This commit is contained in:
Daniel
2019-07-16 13:25:39 +02:00
parent 2bc0da6700
commit f3b5cb89ce
2 changed files with 8 additions and 2 deletions

View File

@@ -61,7 +61,13 @@ func start() error {
err = LoadIndexes()
if err != nil {
if os.IsNotExist(err) {
log.Infof("updates: stable.json does not yet exist, waiting for first update cycle")
// download indexes
log.Infof("updates: downloading update index...")
err = UpdateIndexes()
if err != nil {
return err
}
} else {
return err
}