Skip to content

Commit

Permalink
fix(tool): fix tool hint (cloudwego#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyJavaBean authored Dec 5, 2024
1 parent 2382321 commit 85e3c72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool/cmd/kitex/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ import (
)

func OnKitexToolNormalExit(args kargs.Arguments) {
log.Warn("Code Generation is Done!")

if args.IDLType == "thrift" {
cmd := "go mod edit -replace github.com/apache/thrift=github.com/apache/[email protected]"
argv := strings.Split(cmd, " ")
err := exec.Command(argv[0], argv[1:]...).Run()
if err != nil {
log.Warn("Adding apache/[email protected] to go.mod failed:%s\n please execute the following command manually:\n%s", err.Error(), cmd)
log.Warnf("Tips: please execute the following command to fix apache thrift lib version.\n%s", cmd)
}
}

log.Warn("Code Generation is Done!")

// If hessian option is java_extension, replace *java.Object to java.Object
if thriftgo.EnableJavaExtension(args.Config) {
if err := thriftgo.Hessian2PatchByReplace(args.Config, ""); err != nil {
Expand Down

0 comments on commit 85e3c72

Please sign in to comment.