Skip to content

Commit

Permalink
Merge pull request #5797 from last-genius/private/asultanov/opt-fix
Browse files Browse the repository at this point in the history
Fixes: 99c4356 ("Transition from exception-raising Unix.getenv to Sys.getenv_opt with")
  • Loading branch information
robhoes authored Jul 9, 2024
2 parents 5519cf9 + d26f870 commit 9f9c338
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ocaml/xapi-idl/lib/xcp_service.ml
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ let canonicalise x =
split_c ':' (Option.value (Sys.getenv_opt "PATH") ~default:"")
in
let first_hit =
List.find_opt
List.find_map
(fun path ->
let possibility = Filename.concat path x in
Sys.file_exists possibility
if Sys.file_exists possibility then Some possibility else None
)
(paths @ !extra_search_path)
in
Expand Down

0 comments on commit 9f9c338

Please sign in to comment.