mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix(cmd/gf): go back current working directory after gf gen pb (#3895)
This commit is contained in:
@ -94,6 +94,9 @@ func (c CGenPb) Pb(ctx context.Context, in CGenPbInput) (out *CGenPbOutput, err
|
||||
mlog.Fatalf(`no proto files found in folder "%s"`, in.Path)
|
||||
}
|
||||
|
||||
var originPwd = gfile.Pwd()
|
||||
defer gfile.Chdir(originPwd)
|
||||
|
||||
if err = gfile.Chdir(protoPath); err != nil {
|
||||
mlog.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user