Skip to content

Commit

Permalink
Merge pull request #1573 from OCamlPro/pin-import-err
Browse files Browse the repository at this point in the history
pin import: revert pins if no solution and on user abort
  • Loading branch information
AltGr committed Aug 9, 2014
2 parents 9c2e170 + 72f4f46 commit 1fbeaa7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client/opamSwitchCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ let import_t importfile t =
revert_pins ();
raise e
in
(match solution with
| No_solution | Aborted -> revert_pins ()
| Error _ | OK _ | Nothing_to_do -> ());
OpamSolution.check_solution t solution

let export filename =
Expand Down

0 comments on commit 1fbeaa7

Please sign in to comment.