jesseduffield / jesseduffield/lazygit

Auto-Update check not working

Open
#2,454 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**

After contributing some fixes for the auto-updater a while ago, I was wondering why I'm not being notified about new releases by `lazygit` itself.

The log reports:

```
Feb 20 06:56:56 |INFO| Binary is not built with the buildBinary flag so we won't check for an update
```

After briefly checking the source code, I think there is a mismatch between the build source set for the release [here](https://github.com/jesseduffield/lazygit/blame/d1a8b05401ccda1e52215203139a252eb3be3b79/.goreleaser.yml#L18), i.e. `binaryRelease` and the [check being done here](https://github.com/jesseduffield/lazygit/blob/4b56d428ffda44cf433d7cfdd83ea99417ec3e86/pkg/updates/updates.go#L166), i.e. for `buildBinary`.

If this turns out to actually be the root cause, I'd be happy to file a PR to fix the issue - but I'd need some guidance on which side to change. Adapting the releaser config might unblock auto-updates for previously released versions in the field. Adapting the updater code looks cleaner to me (`binaryRelease` sounds like a better build type choice than `buildBinary`). I'd also be nice to only define this value in one place and refer it in both the config and the code to avoid future issues - if it ever changes again.

**To Reproduce**

Start `lazygit` and check logs.

**Expected behavior**

Notification about new release (0.37.0 at time of writing) is shown.

**Screenshots**

n/a

**Version info:**

```
commit=d1a8b05401ccda1e52215203139a252eb3be3b79, build date=2022-11-14T09:22:31Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.39.2
```

**Additional context**

n/a

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.