Updates #1194
Replies: 1 comment
-
@MikaelWeiss I hacked together an auto-update feature a while back but if I recall correctly, it only updates if you're using a binary from the releases page as opposed to, say, a homebrew installation. There really should be a way to specify that you want auto-updates regardless of where your lazygit binary came from. As for configuration, the default is to check every 14 days, and to prompt you whether you want to update. This can be overridden in your config.yml:
But as I said, it's a little convoluted at the moment thanks to this guy in func (u *Updater) skipUpdateCheck() bool {
// will remove the check for windows after adding a manifest file asking for
// the required permissions
if runtime.GOOS == "windows" {
u.Log.Info("Updating is currently not supported for windows until we can fix permission issues")
return true
}
if u.Config.GetVersion() == "unversioned" {
u.Log.Info("Current version is not built from an official release so we won't check for an update")
return true
}
if u.Config.GetBuildSource() != "buildBinary" {
u.Log.Info("Binary is not built with the buildBinary flag so we won't check for an update")
return true
}
userConfig := u.Config.GetUserConfig()
if userConfig.Update.Method == "never" {
u.Log.Info("Update method is set to never so we won't check for an update")
return true
}
currentTimestamp := time.Now().Unix()
lastUpdateCheck := u.Config.GetAppState().LastUpdateCheck
days := userConfig.Update.Days
if (currentTimestamp-lastUpdateCheck)/(60*60*24) < days {
u.Log.Info("Last update was too recent so we won't check for an update")
return true
}
return false
} If you reckon this is something worth changing, feel free to raise an issue! I can even give you pointers if you want to have a go taking on the ticket yourself. As for how frequent updates are, it's quite sporadic. It's typically once every few weeks |
Beta Was this translation helpful? Give feedback.
-
Will lazygit notify me when there is an update available? Typically, how often are updates? Is there a special way to go about updating?
Beta Was this translation helpful? Give feedback.
All reactions