Skip to content

Opening outside of the git repository results in error and exits #3740

@jdujava

Description

@jdujava

Describe the bug
Opening outside of the git repository results in error and exits with the following message:
2024/07/12 14:07:03 Error: must be run inside a git repository

To Reproduce
Steps to reproduce the behavior:

  1. Try to launch lazygit outside of a git repository
  2. lazygit emits the error message and exits

Expected behavior
It shoud behave in a way specified by the notARepository setting.

Version info:
Run lazygit --version and paste the result here
commit=e0377f2bc, build date=20240712.112152, build source=unknown, version=v0.42.0.e0377f2bc, os=linux, arch=amd64, git version=2.45.2

Additional context
It worked normally in
commit=6fcb7eb8b, build date=20240519.113145, build source=unknown, version=v0.42.0.6fcb7eb8b, os=linux, arch=amd64, git version=2.45.2

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