mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-26 09:00:57 +02:00
Merge branch 'hotfix/167-ambiguous-name-in-diff'
This commit is contained in:
commit
81b07daa01
@ -4,7 +4,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -69,6 +68,9 @@ func TrimTrailingNewline(str string) string {
|
|||||||
// in testing contexts, as with binaries it's unlikely this path will exist on
|
// in testing contexts, as with binaries it's unlikely this path will exist on
|
||||||
// the machine
|
// the machine
|
||||||
func GetProjectRoot() string {
|
func GetProjectRoot() string {
|
||||||
gp := os.Getenv("GOPATH")
|
dir, err := os.Getwd()
|
||||||
return path.Join(gp, "src/github.com/jesseduffield/lazygit")
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return strings.Split(dir, "lazygit")[0] + "lazygit"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user