jesseduffield/lazygit · info

You already have the latest version

Error message

You already have the latest version

What it means

During a user-requested update check, if the fetched latest version string equals the currently running version, getLatestVersionNumber's caller returns the translated OnLatestVersionErr ('You already have the latest version'). It is a sentinel-style error used purely to signal 'nothing to update' to the UI, not a real failure.

Source

Thrown at pkg/updates/updates.go:111

	return fmt.Sprintf("v%s", u.Config.GetVersion())
}

func (u *Updater) checkForNewUpdate() (string, error) {
	u.Log.Info("Checking for an updated version")
	currentVersion := u.currentVersion()
	if err := u.RecordLastUpdateCheck(); err != nil {
		return "", err
	}

	newVersion, err := u.getLatestVersionNumber()
	if err != nil {
		return "", err
	}
	u.Log.Info("Current version is " + currentVersion)
	u.Log.Info("New version is " + newVersion)

	if newVersion == currentVersion {
		return "", errors.New(u.Tr.OnLatestVersionErr)
	}

	if u.majorVersionDiffers(currentVersion, newVersion) {
		errMessage := utils.ResolvePlaceholderString(
			u.Tr.MajorVersionErr, map[string]string{
				"newVersion":     newVersion,
				"currentVersion": currentVersion,
			},
		)
		return "", errors.New(errMessage)
	}

	rawUrl := u.getBinaryUrl(newVersion)

	u.Log.Info("Checking for resource at url " + rawUrl)
	if !u.verifyResourceFound(rawUrl) {
		errMessage := utils.ResolvePlaceholderString(
			u.Tr.CouldNotFindBinaryErr, map[string]string{

View on GitHub (pinned to c477a2959b)

Solutions

  1. Treat it as informational — you are up to date; no action needed.
  2. If you expected a newer release, confirm one actually exists on GitHub releases; the endpoint may lag or be cached.
  3. If you intentionally track a pre-release, install it manually (update checks only consider stable releases).
Defensive patterns

Strategy: try-catch

Try / catch

// In CheckForNewUpdate's onFinish callback, compare against the translated sentinel:
err := updater.CheckForNewUpdate(func(ver string, err error) error {
    if err != nil && err.Error() == u.Tr.OnLatestVersionErr {
        // up to date — not an error path
        return nil
    }
    return err
}, true)

Prevention

When it happens

Trigger: Invoking the 'check for updates' action when lazygit is already at the newest release, or when the version endpoint reports the same tag you are running.

Common situations: Clicking check-for-updates right after installing the latest release; dev builds reporting a version that matches the endpoint.

Related errors


AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15). Data as JSON: /api/errors/0ad11b88cc5527d1. Report an issue: GitHub.