mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
record last update check as soon as you begin checking
This commit is contained in:
parent
96eef7838e
commit
38557f131d
@ -90,6 +90,10 @@ func (u *Updater) majorVersionDiffers(oldVersion, newVersion string) bool {
|
||||
|
||||
func (u *Updater) checkForNewUpdate() (string, error) {
|
||||
u.Log.Info("Checking for an updated version")
|
||||
if err := u.RecordLastUpdateCheck(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
newVersion, err := u.getLatestVersionNumber()
|
||||
if err != nil {
|
||||
return "", err
|
||||
@ -97,10 +101,6 @@ func (u *Updater) checkForNewUpdate() (string, error) {
|
||||
u.Log.Info("Current version is " + u.Config.GetVersion())
|
||||
u.Log.Info("New version is " + newVersion)
|
||||
|
||||
if err := u.RecordLastUpdateCheck(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if newVersion == u.Config.GetVersion() {
|
||||
return "", errors.New("You already have the latest version")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user