Checking for an update with `u` has several problems:
- It offers to download and install the new version for any build
that has a version, including builds from Homebrew or a Linux
distribution. Overwriting those makes the package manager report the
wrong version.
- It only logs its errors, so the user never learns why nothing
happens. This includes "You already have the latest version". For a
build from a git checkout, the version is a commit hash; comparing it
with the release version fails, and the user sees nothing at all.
- Installing always fails on Windows.
Rewrite it on top of the functions from the previous commits. Show the
result of the check in all cases. If there's an update, show a menu
that depends on how lazygit was installed. We only offer "Install now"
for our release archives, and only if we can write to the folder of
the executable. For package managers that we know, we show the command
that updates lazygit. Otherwise we tell the user where to get the new
version. Disable `u` for dev builds and say why.
Installing replaces the executable with a rename, so quitting during
an update can no longer leave a broken binary behind. Instead of
asking for confirmation, wait for the rename to finish before exiting.
Remove the check at startup for now. It never ran, because it checked
for the build source "buildBinary" while .goreleaser.yml sets
"binaryRelease". A later commit adds a new one.
Use os.Executable instead of the osext package; os.Executable didn't
exist yet when this code was written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If mouse support is on (the default), the right end of the status bar
shows "Donate" and "Ask Question" links in front of the version number.
They take space away from the keybinding options on the left, so fewer
of those fit before they get cut off.
Remove both links and keep only the version number. Also remove the
paragraph of the intro popup that asks users to click the donate
button.
We've seen a lot of issues recently where people complain that lazygit doesn't
behave as documented, but that was only because they were running the latest
release but were looking at the documentation of master. Make the documentation
links in the status panel point to the release that they are using in the hope
that this will help a little bit with this problem.
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels).
It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen),
and so due in part to laziness it shortens some descriptions so that we don't need to manage both
a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription
field for when we do want to have both a short and long description.
You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions,
because I could get away with it.