mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
work with absolute paths when invoked with --path
This commit is contained in:
parent
2436ff197a
commit
4744b39f03
1 changed files with 6 additions and 2 deletions
8
main.go
8
main.go
|
@ -71,8 +71,12 @@ func main() {
|
||||||
log.Fatal("--path option is incompatible with the --work-tree and --git-dir options")
|
log.Fatal("--path option is incompatible with the --work-tree and --git-dir options")
|
||||||
}
|
}
|
||||||
|
|
||||||
workTree = repoPath
|
absRepoPath, err := filepath.Abs(repoPath)
|
||||||
gitDir = filepath.Join(repoPath, ".git")
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
workTree = absRepoPath
|
||||||
|
gitDir = filepath.Join(absRepoPath, ".git")
|
||||||
}
|
}
|
||||||
|
|
||||||
if customConfig != "" {
|
if customConfig != "" {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue