Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
$ lazygit2019/07/04 12:45:01 An error occurred! Please create an issue at https://github.com/jesseduffield/lazygit/issues
*errors.errorString fatal: not a git repository (or any of the parent directories): .git
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/pkg/commands/os.go:150 (0x15e1d64)
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/pkg/commands/os.go:63 (0x15e142d)
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/pkg/commands/os.go:116 (0x1838ddd)
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/pkg/commands/os.go:116 (0x1838dbf)
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/pkg/app/app.go:119 (0x18389c0)
/private/tmp/lazygit-20190512-43735-1v1doie/lazygit-0.8/src/github.com/jesseduffield/lazygit/main.go:48 (0x18398fd)
/usr/local/Cellar/go/1.12.5/libexec/src/runtime/proc.go:200 (0x102f34c)
/usr/local/Cellar/go/1.12.5/libexec/src/runtime/asm_amd64.s:1337 (0x105a0f1)
Expected behavior
A shorter error message, for example:
$ git status
fatal: not a git repository (or any of the parent directories): .git
Desktop (please complete the following information):
This was already reported in #447, but that issue is about further enhancements to lazygit to make it easier for the user to find the correct folder. A shorter error message would be enough for me.
We could indeed implement what you suggested and then later implement #447.
@jesseduffield added a fix in lazydocker for these kinds of problems: https://github.com/jesseduffield/lazydocker/pull/14/files
If you want you can create a PR with that fix for this program because the code bases are almost identical.
Cool! I've never written a single line of Go, but I'll try to find time over the next few days to figure it out.
Thought I'd give this a try, here's my PR: https://github.com/jesseduffield/lazygit/pull/473
This issue is fixed by the PR above
closing :)
Most helpful comment
Thought I'd give this a try, here's my PR: https://github.com/jesseduffield/lazygit/pull/473