Skip to content

Commit

Permalink
Take OpamSystem.back_to_forward from ocaml#3346
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed May 10, 2018
1 parent 012ae0f commit 4776a92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/opamSystem.ml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ let env_var env var =
in
aux 0

let back_to_forward =
if Sys.win32 then
String.map (function '\\' -> '/' | c -> c)
else
fun x -> x

(* OCaml 4.05.0 no longer follows the updated PATH to resolve commands. This
makes unqualified commands absolute as a workaround. *)
let resolve_command =
Expand Down
3 changes: 3 additions & 0 deletions src/core/opamSystem.mli
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,6 @@ val register_printer: unit -> unit
lib may not perform properly without this if [Sys.catch_break] isn't set
and SIGPIPE isn't handled (with a no-op) *)
val init: unit -> unit

(** On Unix, a no-op. On Windows, convert \ to / *)
val back_to_forward : string -> string

0 comments on commit 4776a92

Please sign in to comment.