|
|
|
@ -145,7 +145,7 @@ func latestKratos() (string, error) { |
|
|
|
|
|
|
|
|
|
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() |
|
|
|
@ -157,6 +157,9 @@ func gopath() (gp string) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for _, gopath := range gopaths { |
|
|
|
|
if gopath == "" { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
absgp, err := filepath.Abs(gopath) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|