Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having "cmd.exe" in your directory will prevent lazygit from opening. #3692

Open
nytpdy opened this issue Jun 27, 2024 · 0 comments
Open

Having "cmd.exe" in your directory will prevent lazygit from opening. #3692

nytpdy opened this issue Jun 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nytpdy
Copy link

nytpdy commented Jun 27, 2024

Describe the bug
Having "cmd.exe" in your directory will prevent lazygit from opening.

To Reproduce
In the same directory as git, put a "cmd.exe", then powershell and use lazygit.

Expected behavior
I hope mlazygit will open properly even with "cmd.exe"!

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

Version info:
commit=eef70dbdf678f2facf11b84274f2585f442fdb47, build date=2024-06-05T13:00:25Z, build source=unknown, version=eef70dbd, os=windows, arch=amd64, git version=2.41.0.windows.1

git version 2.41.0.windows.1

Additional context
Add any other context about the problem here.

error info
PS D:\8910\cur\MOCOR_20B_W22.15.2> lazygit
2024/06/27 09:48:03 发生错误!请在以下位置创建 issue: https://github.com/jesseduffield/lazygit/issues

*exec.Error exec: "cmd": cannot run executable found relative to current directory
E:/lazygit/pkg/utils/errors.go:13 (0x1332bbd)
sanitisedCommandOutput: return errors.Wrap(err, 0)
E:/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:203 (0x1332bbe)
sanitisedCommandOutput: return "", utils.WrapError(err)
E:/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:107 (0x133195c)
(*cmdObjRunner).RunWithOutputAux: output, err := sanitisedCommandOutput(cmdObj.GetCmd().CombinedOutput())
E:/lazygit/pkg/commands/oscommands/cmd_obj_runner.go:45 (0x1331016)
(*cmdObjRunner).Run: _, err := self.RunWithOutputAux(cmdObj)
E:/lazygit/pkg/commands/oscommands/cmd_obj.go:190 (0x1330149)
(*CmdObj).Run: return self.runner.Run(self)
E:/lazygit/pkg/commands/oscommands/os.go:343 (0x1336c0e)
(*OSCommand).UpdateWindowTitle: return c.Cmd.NewShell(argString).Run()
E:/lazygit/pkg/gui/gui.go:843 (0x1510d68)
(*Gui).loadNewRepo: if err := gui.os.UpdateWindowTitle(); err != nil {
E:/lazygit/pkg/gui/layout.go:209 (0x1518d37)
(*Gui).onInitialViewsCreationForRepo: return gui.loadNewRepo()
E:/lazygit/pkg/gui/layout.go:138 (0x15187c7)
(*Gui).layout: if err := gui.onInitialViewsCreationForRepo(); err != nil {
E:/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:707 (0x1152cf9)
ManagerFunc.Layout: return f(g)
E:/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:1153 (0x1154d4b)
(*Gui).flush: if err := m.Layout(g); err != nil {
E:/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:784 (0x1153439)
(*Gui).processEvent: if err := g.flush(); err != nil {
E:/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:749 (0x1152fdd)
(*Gui).MainLoop: err := g.processEvent()
E:/lazygit/pkg/gui/gui.go:701 (0x150f87a)
(*Gui).Run: return gui.g.MainLoop()
E:/lazygit/pkg/gui/gui.go:707 (0x150fe25)
(*Gui).RunAndHandleError.func1: if err := gui.Run(startArgs); err != nil {
E:/lazygit/pkg/utils/utils.go:99 (0x11f361c)
SafeWithError: err := f()
E:/lazygit/pkg/gui/gui.go:706 (0x150fd6e)
(*Gui).RunAndHandleError: return utils.SafeWithError(func() error {
E:/lazygit/pkg/app/app.go:266 (0x156ae96)
Run: err := app.Gui.RunAndHandleError(startArgs)
E:/lazygit/pkg/app/app.go:49 (0x156ae46)
Run: err = app.Run(startArgs)
E:/lazygit/pkg/app/entry_point.go:161 (0x156d037)
Start: Run(appConfig, common, appTypes.NewStartArgs(cliArgs.FilterPath, parsedGitArg, integrationTest))
E:/lazygit/main.go:23 (0x156e998)
main: app.Start(ldFlagsBuildInfo, nil)
C:/Program Files/Go/src/runtime/internal/atomic/types.go:194 (0xdf20cb)
(*Uint32).Load: return Load(&u.value)
C:/Program Files/Go/src/runtime/asm_amd64.s:1695 (0xe28d61)
goexit: BYTE $0x90 // NOP

@nytpdy nytpdy added the bug Something isn't working label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant