Skip to content

Commit

Permalink
pin: update source of (version) pinned directory (ocaml#3726)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Feb 1, 2019
1 parent 2c1b674 commit c93c1fd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/client/opamAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,14 @@ let download_package st nv =
else
let dir = OpamSwitchState.source_dir st nv in
if OpamPackage.Set.mem nv st.pinned &&
OpamFilename.exists_dir dir
then Done None
OpamFilename.exists_dir dir &&
OpamStd.Option.Op.(
OpamPinned.find_opam_file_in_source nv.name dir >>=
OpamFile.OPAM.read_opt >>=
OpamFile.OPAM.version_opt)
= Some nv.version
then
Done None
else
(OpamUpdate.cleanup_source st
(OpamPackage.Map.find_opt nv st.installed_opams)
Expand Down

0 comments on commit c93c1fd

Please sign in to comment.