Skip to content

Update fails on Windows #4269

Open
@KnapSac

Description

@KnapSac

Describe the bug
I'm unable to update lazygit using the Check for update command.

To Reproduce
Steps to reproduce the behavior:

  1. Go to panel 1 Status
  2. Press u to trigger Check for update
  3. Press Enter when prompted to download and install the new version
  4. The update fails almost immediately with the following error:
    Update failed: tar: lazygit: Not found in archive
    tar: Error exit delayed from previous errors
    

Expected behavior
lazygit is updated to the latest version.

Version info:
I'm purposefully not on the latest version, because there needs to be a newer version to reproduce the bug.

lazygit: commit=c03b89227092b852d50015d289a7c6d8c69811c5, build date=2025-01-17T13:37:10Z, build source=binaryRelease, version=0.45.2, os=windows, arch=amd64, git version=2.47.0.windows.1
git: git version 2.47.0.windows.1

Additional context

Logs

Feb 15 10:07:26 |INFO| git worktree list --porcelain (22.9867ms)
Feb 15 10:07:26 |DEBU| RunCommand command="git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir"
Feb 15 10:07:26 |INFO| git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir (23.5029ms)
Feb 15 10:07:26 |INFO| postRefreshUpdate for worktrees took 0s
Feb 15 10:07:26 |INFO| postRefreshUpdate for localBranches took 0s
Feb 15 10:07:26 |INFO| Heap memory in use: 52.6 MB
Feb 15 10:07:26 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%m%x00%s --abbrev=40 -300 --no-show-signature -- (655.2964ms)
Feb 15 10:07:26 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:07:26 |INFO| postRefreshUpdate for commits took 0s
Feb 15 10:07:26 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:17:55 |INFO| git status --untracked-files=all --porcelain -z --find-renames=50% (184.4656ms)
Feb 15 10:17:55 |INFO| postRefreshUpdate for submodules took 0s
Feb 15 10:17:55 |INFO| postRefreshUpdate for files took 0s
Feb 15 10:17:55 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%m%x00%s --abbrev=40 -300 --no-show-signature -- (624.3136ms)
Feb 15 10:17:55 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:17:55 |INFO| postRefreshUpdate for commits took 1.6039ms
Feb 15 10:17:55 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:17:55 |INFO| git -c log.showSignature=false log -g --abbrev=40 --format=%h%x00%ct%x00%gs%x00%p (693.1327ms)
Feb 15 10:17:55 |INFO| postRefreshUpdate for reflogCommits took 92.1604ms
Feb 15 10:17:55 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads"
Feb 15 10:17:55 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (81.7444ms)
Feb 15 10:17:55 |INFO| postRefreshUpdate for localBranches took 0s
Feb 15 10:17:55 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:18:01 |INFO| git status --untracked-files=all --porcelain -z --find-renames=50% (201.0045ms)
Feb 15 10:18:01 |INFO| postRefreshUpdate for submodules took 0s
Feb 15 10:18:01 |INFO| postRefreshUpdate for files took 0s
Feb 15 10:18:01 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (85.3668ms)
Feb 15 10:18:01 |DEBU| RunCommand command="git worktree list --porcelain"
Feb 15 10:18:01 |INFO| git worktree list --porcelain (24.7517ms)
Feb 15 10:18:01 |DEBU| RunCommand command="git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir"
Feb 15 10:18:01 |INFO| git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir (22.6997ms)
Feb 15 10:18:01 |INFO| postRefreshUpdate for worktrees took 0s
Feb 15 10:18:01 |INFO| postRefreshUpdate for localBranches took 0s
Feb 15 10:18:02 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%m%x00%s --abbrev=40 -300 --no-show-signature -- (658.4816ms)
Feb 15 10:18:02 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:18:02 |INFO| postRefreshUpdate for commits took 0s
Feb 15 10:18:02 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:18:04 |INFO| Checking for an updated version
Feb 15 10:18:04 |INFO| Current version is v0.45.2
Feb 15 10:18:04 |INFO| New version is v0.46.0
Feb 15 10:18:04 |INFO| Url for latest release is https://github.com/jesseduffield/lazygit/releases/download/v0.46.0/lazygit_0.46.0_Windows_x86_64.zip
Feb 15 10:18:04 |INFO| Checking for resource at url https://github.com/jesseduffield/lazygit/releases/download/v0.46.0/lazygit_0.46.0_Windows_x86_64.zip
Feb 15 10:18:04 |INFO| Received status code 200
Feb 15 10:18:04 |INFO| Verified resource is available, ready to update
Feb 15 10:18:05 |INFO| Heap memory in use: 60.8 MB
Feb 15 10:18:05 |INFO| Url for latest release is https://github.com/jesseduffield/lazygit/releases/download/v0.46.0/lazygit_0.46.0_Windows_x86_64.zip
Feb 15 10:18:05 |INFO| Updating with url https://github.com/jesseduffield/lazygit/releases/download/v0.46.0/lazygit_0.46.0_Windows_x86_64.zip
Feb 15 10:18:05 |INFO| Download directory is C:\Users\cverhaar\AppData\Roaming\lazygit
Feb 15 10:18:05 |INFO| Temp path to tarball/zip file is C:\Users\cverhaar\AppData\Roaming\lazygit\temp_lazygit.zip
Feb 15 10:18:06 |INFO| git status --untracked-files=all --porcelain -z --find-renames=50% (194.497ms)
Feb 15 10:18:06 |INFO| postRefreshUpdate for submodules took 0s
Feb 15 10:18:06 |INFO| postRefreshUpdate for files took 0s
Feb 15 10:18:06 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (87.6728ms)
Feb 15 10:18:06 |DEBU| RunCommand command="git worktree list --porcelain"
Feb 15 10:18:06 |INFO| git worktree list --porcelain (24.5004ms)
Feb 15 10:18:06 |DEBU| RunCommand command="git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir"
Feb 15 10:18:06 |INFO| git -C I:/MyRepo rev-parse --path-format=absolute --absolute-git-dir (23.2553ms)
Feb 15 10:18:06 |INFO| postRefreshUpdate for worktrees took 0s
Feb 15 10:18:06 |INFO| postRefreshUpdate for localBranches took 0s
Feb 15 10:18:07 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%m%x00%s --abbrev=40 -300 --no-show-signature -- (640.7065ms)
Feb 15 10:18:07 |DEBU| using cache for key rebase.updateRefs
Feb 15 10:18:07 |INFO| postRefreshUpdate for commits took 0s
Feb 15 10:18:07 |DEBU| using cache for key rebase.updateRefs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions