catch test error, more logging
This commit is contained in:
parent
bdcbb0b677
commit
fb1d33cc17
1 changed files with 5 additions and 1 deletions
|
@ -376,6 +376,7 @@ func (i *Installation) Install(ctx *GlobalContext, updates chan InstallUpdate) e
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Info().Str("mod_reference", modReference).Str("version", version.Version).Str("link", version.Link).Msg("downloading mod")
|
||||||
reader, size, err := utils.DownloadOrCache(modReference+"_"+version.Version+".zip", version.Hash, version.Link, genericUpdates)
|
reader, size, err := utils.DownloadOrCache(modReference+"_"+version.Version+".zip", version.Hash, version.Link, genericUpdates)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to download "+modReference+" from: "+version.Link)
|
return errors.Wrap(err, "failed to download "+modReference+" from: "+version.Link)
|
||||||
|
@ -383,12 +384,15 @@ func (i *Installation) Install(ctx *GlobalContext, updates chan InstallUpdate) e
|
||||||
|
|
||||||
downloading = false
|
downloading = false
|
||||||
|
|
||||||
|
log.Info().Str("mod_reference", modReference).Str("version", version.Version).Str("link", version.Link).Msg("extracting mod")
|
||||||
if err := utils.ExtractMod(reader, size, path.Join(modsDirectory, modReference), genericUpdates); err != nil {
|
if err := utils.ExtractMod(reader, size, path.Join(modsDirectory, modReference), genericUpdates); err != nil {
|
||||||
return errors.Wrap(err, "could not extract "+modReference)
|
return errors.Wrap(err, "could not extract "+modReference)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if genericUpdates != nil {
|
||||||
close(genericUpdates)
|
close(genericUpdates)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
completed++
|
completed++
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue