Skip to content

Commit

Permalink
Fix opam admin check in the presence of the with-dev-setup variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Dec 12, 2024
1 parent 65f3224 commit 482aba6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ users)
## Install script

## Admin
* [BUG] Fix `opam admin check` in the presence of the `with-dev-setup` variable [#6331 @kit-ty-kate - fix #6329]

## Opam installer

Expand Down
10 changes: 6 additions & 4 deletions src/client/opamAdminCheck.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
open OpamTypes
open OpamPackage.Set.Op

let env ~with_test ~with_doc ~dev nv v =
let env ~with_test ~with_doc ~with_dev_setup ~dev nv v =
match OpamVariable.Full.scope v,
OpamVariable.(to_string (Full.variable v))
with
Expand All @@ -27,10 +27,12 @@ let env ~with_test ~with_doc ~dev nv v =
Some (B dev)
| OpamVariable.Full.Global, "with-doc" ->
Some (B with_doc)
| OpamVariable.Full.Global, "with-dev-setup" ->
Some (B with_dev_setup)
| _ -> None

let get_universe ~with_test ~with_doc ~dev opams =
let env = env ~with_test ~with_doc ~dev in
let get_universe ~with_test ~with_doc ~with_dev_setup ~dev opams =
let env = env ~with_test ~with_doc ~with_dev_setup ~dev in
let packages = OpamPackage.keys opams in
{
u_packages = packages;
Expand Down Expand Up @@ -419,7 +421,7 @@ let check ~quiet ~installability ~cycles ~obsolete ~ignore_test repo_root =
in
let univ =
get_universe
~with_test:(not ignore_test) ~with_doc:(not ignore_test) ~dev:false
~with_test:(not ignore_test) ~with_doc:(not ignore_test) ~with_dev_setup:false ~dev:false
opams
in

Expand Down

0 comments on commit 482aba6

Please sign in to comment.