pull/297/head
Tony 5 years ago
parent 43902c3d19
commit fa91b1f8c2
  1. 5
      tool/kratos/tool.go

@ -187,7 +187,7 @@ func (t Tool) installed() bool {
func gopath() (gp string) {
gopaths := strings.Split(os.Getenv("GOPATH"), ":")
if len(gopaths) == 1 {
if len(gopaths) == 1 && gopaths[0] != "" {
return gopaths[0]
}
pwd, err := os.Getwd()
@ -199,6 +199,9 @@ func gopath() (gp string) {
return
}
for _, gopath := range gopaths {
if gopath == "" {
continue
}
absgp, err := filepath.Abs(gopath)
if err != nil {
return

Loading…
Cancel
Save