mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-26 09:00:57 +02:00
check for VERSION file in project directory rather than current directory
This commit is contained in:
parent
6e8abbcdda
commit
481a05f116
5
main.go
5
main.go
@ -74,9 +74,10 @@ func navigateToRepoRootDirectory() {
|
||||
// with `date` and `commit`. If this program has been opened directly via go,
|
||||
// we will populate the `version` with VERSION in the lazygit root directory
|
||||
func fallbackVersion() string {
|
||||
byteVersion, err := ioutil.ReadFile("VERSION")
|
||||
gopath := os.Getenv("GOPATH")
|
||||
byteVersion, err := ioutil.ReadFile(gopath + "/src/github.com/jesseduffield/lazygit/VERSION")
|
||||
if err != nil {
|
||||
log.Panicln(err.Error())
|
||||
return "unversioned"
|
||||
}
|
||||
return string(byteVersion)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user