MCPcopy
hub / github.com/jesseduffield/lazygit / CheckForNewUpdate

Method CheckForNewUpdate

pkg/updates/updates.go:142–151  ·  view source on GitHub ↗

CheckForNewUpdate checks if there is an available update

(onFinish func(string, error) error, userRequested bool)

Source from the content-addressed store, hash-verified

140
141// CheckForNewUpdate checks if there is an available update
142func (u *Updater) CheckForNewUpdate(onFinish func(string, error) error, userRequested bool) {
143 if !userRequested && u.skipUpdateCheck() {
144 return
145 }
146
147 newVersion, err := u.checkForNewUpdate()
148 if err = onFinish(newVersion, err); err != nil {
149 u.Log.Error(err)
150 }
151}
152
153func (u *Updater) skipUpdateCheck() bool {
154 // will remove the check for windows after adding a manifest file asking for

Callers

nothing calls this directly

Calls 3

skipUpdateCheckMethod · 0.95
checkForNewUpdateMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected