forked from cloudwego/kitex
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tool): fix tool hint (cloudwego#1636)
- Loading branch information
1 parent
2382321
commit 85e3c72
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|