Skip to content

Commit

Permalink
fix(cmd/gf): go back current working directory after gf gen pb (#3895)
Browse files Browse the repository at this point in the history
  • Loading branch information
oldme-git authored Nov 11, 2024
1 parent f4db846 commit 5ba165a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/gf/internal/cmd/genpb/genpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 5ba165a

Please sign in to comment.