mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 04:55:33 +03:00
Merge remote-tracking branch 'origin/master' into 2499-rewrites-3
This commit is contained in:
commit
c2abedec70
2 changed files with 6 additions and 2 deletions
|
@ -92,7 +92,11 @@ func (u *Updater) parseVersionResponse(data []byte) (VersionInfo, error) {
|
|||
info.AnnouncementURL = versionJSON["announcement_url"]
|
||||
|
||||
packageURL, ok := u.downloadURL(versionJSON)
|
||||
info.CanAutoUpdate = aghalg.BoolToNullBool(ok && info.NewVersion != u.version)
|
||||
if !ok {
|
||||
return info, fmt.Errorf("version.json: packageURL not found")
|
||||
}
|
||||
|
||||
info.CanAutoUpdate = aghalg.BoolToNullBool(info.NewVersion != u.version)
|
||||
|
||||
u.newVersion = info.NewVersion
|
||||
u.packageURL = packageURL
|
||||
|
|
|
@ -174,7 +174,7 @@ func (u *Updater) prepare(exePath string) (err error) {
|
|||
|
||||
_, pkgNameOnly := filepath.Split(u.packageURL)
|
||||
if pkgNameOnly == "" {
|
||||
return fmt.Errorf("invalid PackageURL")
|
||||
return fmt.Errorf("invalid PackageURL: %q", u.packageURL)
|
||||
}
|
||||
|
||||
u.packageName = filepath.Join(u.updateDir, pkgNameOnly)
|
||||
|
|
Loading…
Reference in a new issue