jesseduffield / lazygit

simple terminal UI for git commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when I try to create a new git repository

MysterHawk opened this issue · comments

Describe the bug
I was trying to create a new git repository in a empty folder, I've launched lazygit and at the question create new git repository I've answered yes, this is the error that the terminal has given me:

host> lazygit.exe
Not in a git repository. Create a new git repository? (y/n): y
2022/05/12 01:23:32 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString Must open lazygit in a git repository
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:187 (0x132e08e)
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:60 (0x132ca45)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:480 (0x1393eba)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:138 (0x13feb7d)
/home/runner/work/lazygit/lazygit/main.go:135 (0x140145d)
/opt/hostedtoolcache/go/1.16.15/x64/src/runtime/proc.go:225 (0xd9bfd6)
/opt/hostedtoolcache/go/1.16.15/x64/src/runtime/asm_amd64.s:1371 (0xdcd6a1)

To Reproduce
Steps to reproduce the behavior:

  1. Go to an empty folder
  2. Launch lazygit
  3. Answer yes to question Create a new git repository

Expected behavior
It should have been created a new git repository

Screenshots

Desktop (please complete the following information):

  • OS: Windows 11
  • Lazygit Version commit=7be25a105d389a262ef040133a4270f2f745d255, build date=2022-03-17T07:07:02Z, build source=binaryRelease, version=0.34, os=windows, arch=amd64

Additional context
Add any other context about the problem here.

I can reproduce it on windows 10, will look into it. It goes to a recent repo after saying y for some reason.

@MysterHawk could you try building #1969 and see if it fixes the crash?

@MysterHawk could you try building #1969 and see if it fixes the crash?

Nice job!

You fixed it! I've just compiled it it works fine now :D

Great! Keep using that build until it gets merged into master and subsequently released.

ezoic increase your site revenue