forked from cloudwego/hertz
optimize: softlink the plugin to $GOPATH/bin (#235)
This commit is contained in:
parent
02f9247392
commit
419a448536
|
@ -75,7 +75,12 @@ func lookupTool(idlType string) (string, error) {
|
|||
if err != nil {
|
||||
return "", fmt.Errorf("failed to get executable path: %s", err)
|
||||
}
|
||||
dir := filepath.Dir(path)
|
||||
gopath, err := util.GetGOPATH()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// softlink the plugin to "$GOPATH/bin"
|
||||
dir := gopath + string(os.PathSeparator) + "bin"
|
||||
if tool == meta.TpCompilerProto {
|
||||
pgh, err := exec.LookPath(meta.ProtocPluginName)
|
||||
linkName := filepath.Join(dir, meta.ProtocPluginName)
|
||||
|
|
Loading…
Reference in New Issue