mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-13 13:59:06 +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) {
|
func (u *Updater) checkForNewUpdate() (string, error) {
|
||||||
u.Log.Info("Checking for an updated version")
|
u.Log.Info("Checking for an updated version")
|
||||||
|
if err := u.RecordLastUpdateCheck(); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
newVersion, err := u.getLatestVersionNumber()
|
newVersion, err := u.getLatestVersionNumber()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@ -97,10 +101,6 @@ func (u *Updater) checkForNewUpdate() (string, error) {
|
|||||||
u.Log.Info("Current version is " + u.Config.GetVersion())
|
u.Log.Info("Current version is " + u.Config.GetVersion())
|
||||||
u.Log.Info("New version is " + newVersion)
|
u.Log.Info("New version is " + newVersion)
|
||||||
|
|
||||||
if err := u.RecordLastUpdateCheck(); err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
if newVersion == u.Config.GetVersion() {
|
if newVersion == u.Config.GetVersion() {
|
||||||
return "", errors.New("You already have the latest version")
|
return "", errors.New("You already have the latest version")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user