summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 6ad705dd1..eaf0c5a1d 100644
--- a/main.go
+++ b/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)
}