jesseduffield / jesseduffield/lazygit
Bad config in `.gitconfig` causes wrong error in lazygit
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
Bad config in `.gitconfig` would cause wrong error generation by lazygit
**To Reproduce**
Steps to reproduce the behavior:
1. mess up your `~/.gitconfig` (in my case I had a typo in `editor`) and save it
2. go to a git folder
3. run `lazygit` which throws this error:
> 2022/07/11 09:25: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.
4. in the same folder try `git status` and see this error:
> fatal: bad config line 15 in file /home/mehrad/.gitconfig
**Expected behavior**
I expected that lazygit produces an error that points to the correct issue. imho the git error is clear enough and that can be used.
**Screenshots**
Note that the error code of each command is printed at the end of the next prompt, so git's error code is 128 and lazygit is 1

**Desktop (please complete the following information):**
- OS: Manjaro Linux
- Lazygit Version: `commit=v0.34, build date=2022-04-27T13:28:28Z, build source=binaryRelease, version=0.34, os=linux, arch=amd64` from the "community repo"
**Additional context**
-- not applicable --
Contributor guide
Assessment
This issue has not been assessed yet.