jesseduffield / lazygit

simple terminal UI for git commands
MIT License
51.63k stars 1.81k forks source link

Error when installing via Winget. #3099

Open M43R opened 11 months ago

M43R commented 11 months ago

Describe the bug Error when installing via winget, works only with elevated privileges, does not ask for elevation

To Reproduce Steps to reproduce the behavior:

  1. winget install -e --id=JesseDuffield.lazygit (NotElevated)
  2. See error

Screenshots WindowsTerminal_R5p3VMYA3k

Version info: lazygit --version commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=windows, arch=amd64, git version=2.42.0.windows.2

git --version git version 2.42.0.windows.2

mloskot commented 9 months ago

This is a known issue that lazygit is currently not installable via winget, see

and just now, @stephengillie - huge kudos for baring with this issue and testing! - kindly posted and update in https://github.com/microsoft/winget-pkgs/pull/107885#issuecomment-1867875921 which I'm copying below

2023/05/23 17:57:57 Git version must be at least 2.0 (i.e. from 2014 onwards). Please upgrade your git version. Alternatively raise an issue at https://github.com/jesseduffield/lazygit/issues for lazygit to be more backwards compatible.
PS C:\Users\User\Desktop> C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\JesseDuffield.lazygit_Microsoft.Winget.Source_8wekyb3d8bbwe\lazygit.exe -version
commit=16802a048e0425182f08cf0e9a2bc31480e9a55d, build date=2023-02-01T11:02:43Z, build source=binaryRelease, version=0.37.0, os=windows, arch=amd64, git version=
PS C:\Users\User\Desktop> &"C:\Program Files\Git\bin\git.exe" "-v"
git version 2.40.1.windows.1
mloskot commented 8 months ago

FYI, lazygit 0.40.2 installs for me fine on Windows 11 with winget v1.7.3481-preview:

image

It runs fine too, in Windows Terminal with PowerShell 7.4

image

gwd666 commented 5 months ago

yep 0.40.2 works (for me as well) -> so I installed this specific version with: winget add -s winget --scope user --id JesseDuffield.lazygit -v 0.40.2 which is fine for now ... until newer version gets stabilized, I guess. the newest version on winget ie 0.41.0 gives a bunch of /home/... and two /opt/... errors when calling lazygit: Errors encountered:

2024/04/17 18:31:55 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*fs.PathError chdir /c/Users/g025ara/git-repos/egs-AzureClasses: The system cannot find the path specified.
/home/runner/work/lazygit/lazygit/pkg/utils/errors.go:13 (0x10bf585)
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:70 (0x10bf586)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:300 (0x1247ae5)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:692 (0x124a81b)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:711 (0x124af05)
/home/runner/work/lazygit/lazygit/pkg/utils/utils.go:117 (0xf3ea7c)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:710 (0x124ae4e)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:266 (0x127bdf1)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:49 (0x127bd86)
/home/runner/work/lazygit/lazygit/pkg/app/entry_point.go:150 (0x127dfd3)
/home/runner/work/lazygit/lazygit/main.go:23 (0x127f7f8)
/opt/hostedtoolcache/go/1.21.8/x64/src/runtime/internal/atomic/types.go:194 (0xb6dd12)
/opt/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 (0xb9b621)

and after that exits/fails.
This happens irrespective if command lazygit is executed in a git repo folder or not. My OS is Win10 Pro. Git version is: git version 2.44.0.windows.1