Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pin version: don't error if archive opam file is malformed #4580

Merged
merged 1 commit into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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