jesseduffield / jesseduffield/lazygit

Crashes when run on a network share

Open
#3,071 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
In a windows powershell (7.2) terminal, running lazygit causes it to crash.

**To Reproduce**
1. Open a powershell terminal.
2. cd into a network share ("\\someserver\c$\gitstuff").
3. Run lazygit, and watch it crash.

**Expected behavior**
It should start as it normally does.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version info:**
```
2023/10/14 00:11:55 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:235 (0x12a76a6)
/home/runner/work/lazygit/lazygit/pkg/commands/git.go:87 (0x12a6090)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:271 (0x13d9114)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:656 (0x13dbc98)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:675 (0x13dc2ac)
/home/runner/work/lazygit/lazygit/pkg/utils/utils.go:108 (0x110e7e7)
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:674 (0x13dc1f4)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:263 (0x140a929)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:48 (0x140a8be)
/home/runner/work/lazygit/lazygit/pkg/app/entry_point.go:150 (0x140cb66)
/home/runner/work/lazygit/lazygit/main.go:23 (0x140e3fe)
/opt/hostedtoolcache/go/1.20.7/x64/src/runtime/internal/atomic/types.go:194 (0xd1a2d7)
/opt/hostedtoolcache/go/1.20.7/x64/src/runtime/asm_amd64.s:1598 (0xd472e1)
PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> [environment]::CurrentDirectory
\\someserver\c$\stuff\stuffops
PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> $pwd

Path
----
Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops

PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> D:\Projects\Apps\lazygit\lazygit.exe --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
PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> git st
warning: untracked cache is disabled on this system or location
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
(use "git push" to publish your local commits)

nothing to commit, working tree clean
PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> git --version
git version 2.42.0.windows.2
PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops> $PSVersionTable

Name Value
---- -----
PSVersion 7.3.8
PSEdition Core
GitCommitId 7.3.8
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

PS Microsoft.PowerShell.Core\FileSystem::\\someserver\c$\stuff\stuffops>
```

**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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.