1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

Merge pull request #169 from godsoul/master

获取GOBIN不在GOPATH下的情况
This commit is contained in:
Tony 2019-06-21 21:31:01 +08:00 committed by GitHub
commit 5de5fbfa79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,6 +174,9 @@ func (t Tool) updated() bool {
}
func (t Tool) toolPath() string {
if gobin := os.Getenv("GOBIN"); len(gobin) > 0 {
return filepath.Join(gobin, t.Alias)
}
return filepath.Join(gopath(), "bin", t.Alias)
}