1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00

修复windows下无法识别到已安装的tool且每次使用tool都会重新安装

This commit is contained in:
hizzd 2020-03-18 03:07:51 +08:00
parent 7c946dc919
commit 03ec01dde2

View File

@ -180,6 +180,9 @@ func (t Tool) toolPath() string {
name = t.Name
}
gobin := Getenv("GOBIN")
if runtime.GOOS == "windows" {
name += ".exe"
}
if gobin != "" {
return filepath.Join(gobin, name)
}