diff --git a/src/client/opamClient.ml b/src/client/opamClient.ml index 241ea2b28d1..12f2345dbef 100644 --- a/src/client/opamClient.ml +++ b/src/client/opamClient.ml @@ -799,9 +799,11 @@ let git_for_windows kind mechanism cygwin_is_tweakable = in let options = (List.filter_map (fun (git, bash) -> - if bash then None else - let bin = Filename.dirname git in - Some (`Location bin, "Use found git in "^bin)) + if bash then + None + else + let bin = Filename.dirname git in + Some (`Location bin, "Use found git in "^bin)) gits) @ [ `Specify, "Enter the location of your Git installation"; @@ -1079,7 +1081,7 @@ let rec cygwin_menu header = begin match cygcheck with | Some (Ok (kind2, root2)) -> let root2 = OpamFilename.Dir.to_string root2 in - if kind = kind2 && String.equal root root2 then + if (kind : [`Cygwin | `Msys2]) = kind2 && String.equal root root2 then let default, warning = if kind = `Msys2 && OpamSystem.resolve_command pacman = None then internal_option, Some (Printf.sprintf diff --git a/src/state/opamSysPoll.ml b/src/state/opamSysPoll.ml index 9544f8dcd1c..ebcfb2ffcd5 100644 --- a/src/state/opamSysPoll.ml +++ b/src/state/opamSysPoll.ml @@ -121,7 +121,7 @@ let poll_os_distribution () = begin match kind with | `Msys2 -> Some "msys2" | `Cygwin -> Some "cygwin" - | _ -> os + | `Native | `Tainted _ -> os end | os -> os let os_distribution = Lazy.from_fun poll_os_distribution