1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-23 21:51:07 +02:00

work with absolute paths when invoked with --path

This commit is contained in:
TicClick 2022-01-06 00:32:20 +01:00 committed by Jesse Duffield
parent 2436ff197a
commit 4744b39f03

View File

@ -71,8 +71,12 @@ func main() {
log.Fatal("--path option is incompatible with the --work-tree and --git-dir options")
}
workTree = repoPath
gitDir = filepath.Join(repoPath, ".git")
absRepoPath, err := filepath.Abs(repoPath)
if err != nil {
log.Fatal(err)
}
workTree = absRepoPath
gitDir = filepath.Join(absRepoPath, ".git")
}
if customConfig != "" {