File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ module Find_in_path = struct
118118 | None -> prog_not_found prog
119119 | Some fn -> fn
120120
121- let find prog =
121+ let which prog =
122122 List. find_map (get_path () ) ~f: (fun dir ->
123123 let fn = dir ^/ prog ^ exe in
124124 Option. some_if (Sys. file_exists fn) fn)
@@ -470,9 +470,9 @@ const char *s%i = "BEGIN-%i-false-END";
470470 Sys. rename tmp_fname fname
471471end
472472
473- let find_in_path t prog =
474- logf t " find_in_path : %s" prog;
475- let x = Find_in_path. find prog in
473+ let which t prog =
474+ logf t " which : %s" prog;
475+ let x = Find_in_path. which prog in
476476 logf t " -> %s"
477477 (match x with
478478 | None -> " not found"
@@ -486,7 +486,7 @@ module Pkg_config = struct
486486 }
487487
488488 let get c =
489- Option. map (find_in_path c " pkg-config" ) ~f: (fun pkg_config ->
489+ Option. map (which c " pkg-config" ) ~f: (fun pkg_config ->
490490 { pkg_config; configurator = c })
491491
492492 type package_conf =
@@ -502,7 +502,7 @@ module Pkg_config = struct
502502 let env =
503503 match ocaml_config_var c " system" with
504504 | Some "macosx" -> begin
505- match find_in_path c " brew" with
505+ match which c " brew" with
506506 | Some brew ->
507507 let prefix =
508508 String. trim (run_capture_exn c ~dir (command_line brew [" --prefix" ]))
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ module Flags : sig
118118 Any blank words are filtered out of the results. *)
119119end
120120
121- val find_in_path : t -> string -> string option
122- (* * [find_in_path t prog] seek [prog] in the PATH and return the name
121+ val which : t -> string -> string option
122+ (* * [which t prog] seek [prog] in the PATH and return the name
123123 of the program prefixed with the first path where it is found.
124124 Return [None] the the program is not found. *)
125125
You can’t perform that action at this time.
0 commit comments