Skip to content

Commit b6929f8

Browse files
committed
Fix update popup showing up before release is published
1 parent b20c4b0 commit b6929f8

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

backend/autoupdate/updater/check.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ func (u *Updater) CheckForUpdate() error {
5454
}
5555
}
5656

57-
u.PendingUpdate = &PendingUpdate{
58-
Version: latestSemver,
59-
Changelogs: newChangelogs,
60-
Ready: false,
61-
}
62-
u.UpdateFound.Dispatch(*u.PendingUpdate)
63-
6457
if u.config.File == "" || u.config.Apply == nil {
58+
u.PendingUpdate = &PendingUpdate{
59+
Version: latestSemver,
60+
Changelogs: newChangelogs,
61+
Ready: false,
62+
}
63+
u.UpdateFound.Dispatch(*u.PendingUpdate)
64+
6565
slog.Debug("no update file or apply method specified, not downloading update")
6666
return nil
6767
}
@@ -72,6 +72,13 @@ func (u *Updater) CheckForUpdate() error {
7272
}
7373
defer file.Close()
7474

75+
u.PendingUpdate = &PendingUpdate{
76+
Version: latestSemver,
77+
Changelogs: newChangelogs,
78+
Ready: false,
79+
}
80+
u.UpdateFound.Dispatch(*u.PendingUpdate)
81+
7582
var checksum []byte
7683
if u.config.Checksum != nil {
7784
checksum, err = u.config.Checksum.GetChecksumForFile(u.config.Source, latestVersion, u.config.File)

0 commit comments

Comments
 (0)