diff --git a/master_changes.md b/master_changes.md index b25cff23855..ff4569790c9 100644 --- a/master_changes.md +++ b/master_changes.md @@ -188,3 +188,4 @@ users) * `OpamStd.Config.env_level`: fix level parsing, it was inverted (eg, "no" gives level 1, and "yes" level 0) [#5686 @smorimoto] * `OpamStd.Sys.chop_exe_suffix`: removes `.exe` from the end of a path, if present * `OpamSystem.get_cygpath_path_transform`: add labeled argument to specify if path is a pathlist [#5636 @rjbou] + * `OpamSystem.apply_cygpath_path_transform`: fix cygpath call, use resolved name [#5716 @rjbou] diff --git a/src/core/opamSystem.ml b/src/core/opamSystem.ml index 146516a95ab..aa973996df5 100644 --- a/src/core/opamSystem.ml +++ b/src/core/opamSystem.ml @@ -548,12 +548,12 @@ let get_cygpath_function = let f = Lazy.from_val (fun x -> x) in fun ~command:_ -> f -let apply_cygpath_path_transform ~pathlist path = +let apply_cygpath_path_transform ~pathlist cygpath path = let args = if pathlist then [ "--path" ] else [] in let r = OpamProcess.run - (OpamProcess.command ~name:(temp_file "command") - ~verbose:false "cygpath" (args @ ["--"; path])) + (OpamProcess.command ~name:(temp_file "command") ~verbose:false + cygpath (args @ ["--"; path])) in OpamProcess.cleanup ~force:true r; if OpamProcess.is_success r then @@ -567,7 +567,7 @@ let get_cygpath_path_transform = if Sys.win32 then lazy ( match resolve_command "cygpath" with - | Some _ -> apply_cygpath_path_transform + | Some cygpath -> apply_cygpath_path_transform cygpath | None -> fun ~pathlist:_ x -> x) else Lazy.from_val (fun ~pathlist:_ x -> x)