mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-26 03:52:12 +02:00
Merge pull request #524 from hizzd/master
修复windows下无法识别到已安装的tool且每次使用tool都会重新安装
This commit is contained in:
commit
00aea6ffd6
@ -180,6 +180,9 @@ func (t Tool) toolPath() string {
|
|||||||
name = t.Name
|
name = t.Name
|
||||||
}
|
}
|
||||||
gobin := Getenv("GOBIN")
|
gobin := Getenv("GOBIN")
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
name += ".exe"
|
||||||
|
}
|
||||||
if gobin != "" {
|
if gobin != "" {
|
||||||
return filepath.Join(gobin, name)
|
return filepath.Join(gobin, name)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user