diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-09 12:55:41 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-09 12:55:41 +1000 |
commit | 481a05f1165159124a4f9b0f50deff27fdffc26d (patch) | |
tree | 51c2c732ce98111bf930ea9c7fbf58a41a61bdfc /main.go | |
parent | 6e8abbcddad641a000c45985b22a8d0899f02781 (diff) |
check for VERSION file in project directory rather than current directory
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) } |