feat: don't always report update errors to frontend

This commit is contained in:
James Houlahan
2021-01-14 16:07:33 +01:00
parent 10301b8600
commit 9bb7c828cd
4 changed files with 43 additions and 6 deletions

View File

@ -142,11 +142,11 @@ func (u *Updater) InstallUpdate(update VersionInfo) error {
r, err := client.DownloadAndVerify(update.Package, update.Package+".sig", u.kr)
if err != nil {
return errors.Wrap(err, "failed to download and verify update package")
return errors.Wrap(ErrDownloadVerify, err.Error())
}
if err := u.installer.InstallUpdate(update.Version, r); err != nil {
return errors.Wrap(err, "failed to install update package")
return errors.Wrap(ErrInstall, err.Error())
}
u.curVer = update.Version