Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick windows fixes for 4.03 #70

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not calling sys_command directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is implem.run_and_open overwritten in the first place?
I've assumed to avoid a temporary file, if Unix.open_process_in is used instead of Sys.command.

let ic = Unix.open_process_in s in
let close () =
match Unix.close_process_in ic with
Expand Down