Skip to content

Commit

Permalink
Merge pull request #4580 from rjbou/pin-version-fix
Browse files Browse the repository at this point in the history
pin version: don't error if archive opam file is malformed
  • Loading branch information
rjbou authored Mar 26, 2021
2 parents 874955a + 7297761 commit 7f15f18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ New option/command/subcommand are prefixed with ◈.
* Fetch sources when pinning an already pinned package with a different url when using working directory [#4542 @rjbou - fix #4484]
* Don't ask for confirmation for pinning base packages (similarly makes no
sense with 2.1 switch invariants) [#4571 @dra27]
* Fix version pin source retrieving: mustn't error if archive opam file is malformed [#4580 @rjbou]

## List
* --silent renamed to --check [#4595 @dra27 - fix #4323]
Expand Down
4 changes: 2 additions & 2 deletions src/client/opamAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ let download_package st nv =
if OpamPackage.Set.mem nv st.pinned &&
OpamFilename.exists_dir dir &&
OpamStd.Option.Op.(
OpamPinned.find_opam_file_in_source nv.name dir >>=
OpamFile.OPAM.read_opt >>=
OpamPinned.find_opam_file_in_source nv.name dir >>|
OpamFile.OPAM.safe_read >>=
OpamFile.OPAM.version_opt)
= Some nv.version
then Done None
Expand Down

0 comments on commit 7f15f18

Please # to comment.