From 31e75db0cf77295a1a5c7e8d8c793ce28014ad86 Mon Sep 17 00:00:00 2001 From: Kate Date: Tue, 21 Mar 2023 17:56:51 +0000 Subject: [PATCH] Fix a failure when using opam-monorepo with an opam 2.2 root --- CHANGES.md | 3 +++ bin/opam_monorepo.ml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5768750b3..114cdb747 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,9 @@ - Error in case where multiple packages with different dev-repo fields would be placed in the same duniverse directory (#377, @gridbugs) +- Fix a failure when using opam-monorepo with an opam 2.2 root + (#379, @kit-ty-kate) + ### Removed ### Security diff --git a/bin/opam_monorepo.ml b/bin/opam_monorepo.ml index 0fe6234e2..d11df5184 100644 --- a/bin/opam_monorepo.ml +++ b/bin/opam_monorepo.ml @@ -21,7 +21,7 @@ let cmds = [ Lock.cmd; Pull.cmd; Depext.cmd; List_cmd.cmd ] let init_opam () = OpamSystem.init (); let root = OpamStateConfig.opamroot () in - ignore (OpamStateConfig.load_defaults root); + ignore (OpamStateConfig.load_defaults ~lock_kind:`Lock_read root); OpamFormatConfig.init (); OpamCoreConfig.init ~safe_mode:true (); OpamRepositoryConfig.init ();