Skip to content

Commit

Permalink
fix the source code directory after the soft link (#4425)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjinheng authored Oct 19, 2024
1 parent 94e476a commit 796dd5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/goctl/rpc/generator/genpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"

"github.com/zeromicro/go-zero/tools/goctl/rpc/execx"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)

// GenPb generates the pb.go file, which is a layer of packaging for protoc to generate gprc,
Expand Down Expand Up @@ -88,7 +89,7 @@ func findPbFile(current string, src string, grpc bool) (string, error) {
return nil
})
if errors.Is(err, os.ErrExist) {
return filepath.Dir(filepath.Join(current, ret)), nil
return pathx.ReadLink(filepath.Dir(filepath.Join(current, ret)))
}
return "", err
}

0 comments on commit 796dd5b

Please sign in to comment.