Skip to content

Commit

Permalink
Do not call an unnecessary identity function when getting the source …
Browse files Browse the repository at this point in the history
…definition of pinned packages
  • Loading branch information
kit-ty-kate committed Mar 10, 2025
1 parent 9363a84 commit ec45d71
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/client/opamPinCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ let get_source_definition ?version ?subpath ?locked st nv url =
let root = st.switch_global.root in
let srcdir = OpamPath.Switch.pinned_package root st.switch nv.name in
let fix opam =
OpamFile.OPAM.with_url url @@
(match version with
| Some v -> OpamFile.OPAM.with_version v
| None -> fun o -> o) @@
opam
let opam = OpamFile.OPAM.with_url url opam in
match version with
| Some v -> OpamFile.OPAM.with_version v opam
| None -> opam
in
let open OpamProcess.Job.Op in
OpamUpdate.fetch_dev_package url srcdir ?subpath nv @@| function
Expand Down

0 comments on commit ec45d71

Please sign in to comment.