Skip to content

Commit 2a2cb27

Browse files
authored
Merge pull request #4844 from rescript-lang/install_fix_for_windows
fix installation copy rule for windows
2 parents 4ed36c4 + 5b39e82 commit 2a2cb27

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

jscomp/bsb/bsb_ninja_gen.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
107107
o suffix; o "\n" in
108108
let bs = ".."//"bs" in
109109
let sb = ".."//".." in
110-
o "rule cp\n command = cp $i $out\n";
110+
o (if Ext_sys.is_windows_or_cygwin then
111+
"rule cp\n command = cmd.exe /C copy /Y $i $out > null\n"
112+
else
113+
"rule cp\n command = cp $i $out\n"
114+
);
111115
files_to_install
112116
|> Queue.iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info) ->
113117
let base = Filename.basename name_sans_extension in

lib/4.06.1/bsb.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13610,7 +13610,11 @@ let output_installation_file cwd_lib_bs namespace files_to_install =
1361013610
o suffix; o "\n" in
1361113611
let bs = ".."//"bs" in
1361213612
let sb = ".."//".." in
13613-
o "rule cp\n command = cp $i $out\n";
13613+
o (if Ext_sys.is_windows_or_cygwin then
13614+
"rule cp\n command = cmd.exe /C copy /Y $i $out > null\n"
13615+
else
13616+
"rule cp\n command = cp $i $out\n"
13617+
);
1361413618
files_to_install
1361513619
|> Queue.iter (fun ({name_sans_extension;syntax_kind; info} : Bsb_db.module_info) ->
1361613620
let base = Filename.basename name_sans_extension in

ninja

win32/ninja.exe

119 KB
Binary file not shown.

0 commit comments

Comments
 (0)