Skip to content

Commit

Permalink
use bash also inside ocamlbuild_unix_plugin in order to be consistent…
Browse files Browse the repository at this point in the history
… with My_unix (win32 only)
  • Loading branch information
fdopen authored and Hugo Heuzard committed May 28, 2024
1 parent 1d8e87a commit 384e11f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugin-lib/ocamlbuild_unix_plugin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ let at_exit_once callback =
end

let run_and_open s kont =
let s =
(* Be consistent! My_unix.run_and_open uses My_std.sys_command and
sys_command uses bash. *)
if Sys.win32 then
"bash --norc -c " ^ Filename.quote s
else
s
in
let ic = Unix.open_process_in s in
let close () =
match Unix.close_process_in ic with
Expand Down

0 comments on commit 384e11f

Please sign in to comment.