{"record":{"id":"0ad11b88cc5527d1","repo":"jesseduffield/lazygit","slug":"you-already-have-the-latest-version","errorCode":null,"errorMessage":"You already have the latest version","messagePattern":"You already have the latest version","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"pkg/updates/updates.go","lineNumber":111,"sourceCode":"\treturn fmt.Sprintf(\"v%s\", u.Config.GetVersion())\n}\n\nfunc (u *Updater) checkForNewUpdate() (string, error) {\n\tu.Log.Info(\"Checking for an updated version\")\n\tcurrentVersion := u.currentVersion()\n\tif err := u.RecordLastUpdateCheck(); err != nil {\n\t\treturn \"\", err\n\t}\n\n\tnewVersion, err := u.getLatestVersionNumber()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tu.Log.Info(\"Current version is \" + currentVersion)\n\tu.Log.Info(\"New version is \" + newVersion)\n\n\tif newVersion == currentVersion {\n\t\treturn \"\", errors.New(u.Tr.OnLatestVersionErr)\n\t}\n\n\tif u.majorVersionDiffers(currentVersion, newVersion) {\n\t\terrMessage := utils.ResolvePlaceholderString(\n\t\t\tu.Tr.MajorVersionErr, map[string]string{\n\t\t\t\t\"newVersion\":     newVersion,\n\t\t\t\t\"currentVersion\": currentVersion,\n\t\t\t},\n\t\t)\n\t\treturn \"\", errors.New(errMessage)\n\t}\n\n\trawUrl := u.getBinaryUrl(newVersion)\n\n\tu.Log.Info(\"Checking for resource at url \" + rawUrl)\n\tif !u.verifyResourceFound(rawUrl) {\n\t\terrMessage := utils.ResolvePlaceholderString(\n\t\t\tu.Tr.CouldNotFindBinaryErr, map[string]string{","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/updates/updates.go#L93-L129","documentation":"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.","triggerScenarios":"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.","commonSituations":"Clicking check-for-updates right after installing the latest release; dev builds reporting a version that matches the endpoint.","solutions":["Treat it as informational — you are up to date; no action needed.","If you expected a newer release, confirm one actually exists on GitHub releases; the endpoint may lag or be cached.","If you intentionally track a pre-release, install it manually (update checks only consider stable releases)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// In CheckForNewUpdate's onFinish callback, compare against the translated sentinel:\nerr := updater.CheckForNewUpdate(func(ver string, err error) error {\n    if err != nil && err.Error() == u.Tr.OnLatestVersionErr {\n        // up to date — not an error path\n        return nil\n    }\n    return err\n}, true)","preventionTips":["Treat OnLatestVersionErr as a sentinel: match its message (or use errors.Is with the concrete error value) before reporting failure.","Remember this only fires for user-requested checks; background checks skip silently.","Compare versions client-side if you need a boolean 'is latest' answer."],"tags":["updates","versioning","sentinel-error"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}