1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-30 09:16:47 +02:00

Merge pull request #2092 from mark2185/fix-wrong-git-path

This commit is contained in:
Jesse Duffield 2022-09-17 15:12:04 -07:00 committed by GitHub
commit f23547580a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,11 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
if err != nil {
log.Fatal(err)
}
if isRepo, err := isDirectoryAGitRepository(absRepoPath); err != nil || !isRepo {
log.Fatal(absRepoPath + " is not a valid git repository.")
}
cliArgs.WorkTree = absRepoPath
cliArgs.GitDir = filepath.Join(absRepoPath, ".git")
}