mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
check for VERSION file in project directory rather than current directory
This commit is contained in:
parent
6e8abbcdda
commit
481a05f116
1 changed files with 3 additions and 2 deletions
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,
|
// 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
|
// we will populate the `version` with VERSION in the lazygit root directory
|
||||||
func fallbackVersion() string {
|
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 {
|
if err != nil {
|
||||||
log.Panicln(err.Error())
|
return "unversioned"
|
||||||
}
|
}
|
||||||
return string(byteVersion)
|
return string(byteVersion)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue