jesseduffield / jesseduffield/lazygit
`LAZYGIT_NEW_DIR_FILE` error in wsl
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
When I added the scripts of `Changing Directory On Exit` on WSL's bashrc, it will cause me to fail to start lazygit.

**To Reproduce**
Steps to reproduce the behavior:
1. Add it to `bashrc`, save and quit:
```
lg()
{
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
lazygit "$@"
if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null
fi
}
```
2. Open a new terminal, and try to start lazygit in a git project directory, then will kill the wsl process

**Expected behavior**
it should work fine.
**Screenshots**
Above.
**Version info:**
_commit=924a152ae92372a178bd0fc32b411612b995a6a1, build date=2022-11-15T05:00:46Z, build source=unknown, version=924a152a, os=linux, arch=amd64, git version=2.25.1_
_git version 2.25.1_
**Additional context**
Add any other context about the problem here.
**Note:** please try updating to the latest version or [manually building](https://github.com/jesseduffield/lazygit/#manual) the latest `master` to see if the issue still occurs.
Contributor guide
Assessment
This issue has not been assessed yet.