Skip to content

Error when launching in a none repository folder #3849

@zoiman

Description

@zoiman

Describe the bug
When I launch lazygit in a folder which is not a git repository I get the following error:

2024/08/23 17:59:42 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString 'git -C /Users/zoiman rev-parse --path-format=absolute --show-toplevel --absolute-git-dir --git-common-dir --is-bare-repository --show-superproject-working-tree' failed: Schwerwiegend: Kein Git-Repository (oder irgendeines der Elternverzeichnisse): .git

github.com/jesseduffield/lazygit/pkg/commands/git_commands/repo_paths.go:147 (0x10115eab8)
github.com/jesseduffield/lazygit/pkg/commands/git_commands/repo_paths.go:91 (0x10115e3c8)
github.com/jesseduffield/lazygit/pkg/commands/git_commands/repo_paths.go:83 (0x10115e2b4)
github.com/jesseduffield/lazygit/pkg/app/app.go:123 (0x101350248)
github.com/jesseduffield/lazygit/pkg/app/app.go:45 (0x10134fbf8)
github.com/jesseduffield/lazygit/pkg/app/entry_point.go:161 (0x101351840)
github.com/jesseduffield/lazygit/main.go:23 (0x1013533a8)
runtime/internal/atomic/types.go:194 (0x100c4ebbc)
runtime/asm_arm64.s:1222 (0x100c89004)

Version info:
Run lazygit --version and paste the result here

commit=, build date=, build source=homebrew, version=0.43.1, os=darwin, arch=arm64, git version=2.46.0

Run git --version and paste the result here

git version 2.46.0

I reverted to the default config which result in the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions