Skip to content

Commit 5ba165a

Browse files
authored
fix(cmd/gf): go back current working directory after gf gen pb (#3895)
1 parent f4db846 commit 5ba165a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/gf/internal/cmd/genpb/genpb.go

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func (c CGenPb) Pb(ctx context.Context, in CGenPbInput) (out *CGenPbOutput, err
9494
mlog.Fatalf(`no proto files found in folder "%s"`, in.Path)
9595
}
9696

97+
var originPwd = gfile.Pwd()
98+
defer gfile.Chdir(originPwd)
99+
97100
if err = gfile.Chdir(protoPath); err != nil {
98101
mlog.Fatal(err)
99102
}

0 commit comments

Comments
 (0)