File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -280,11 +280,6 @@ let prog_and_args_of_values p ~dir =
280
280
281
281
module SW = String_with_vars
282
282
283
- let concat = function
284
- | [] -> " "
285
- | [x] -> x
286
- | xs -> String. concat ~sep: " " xs
287
-
288
283
module Unexpanded = struct
289
284
module type Uast = Action_intf. Ast
290
285
with type program = String_with_vars. t
@@ -693,7 +688,7 @@ let rec exec t ~ectx ~dir ~env ~stdout_to ~stderr_to =
693
688
exec t ~ectx ~dir ~stdout_to ~stderr_to
694
689
~env: (Env. add env ~var ~value )
695
690
| Redirect (Stdout, fn , Echo s ) ->
696
- Io. write_file fn (concat s);
691
+ Io. write_file fn (String. concat s ~sep: " " );
697
692
Fiber. return ()
698
693
| Redirect (outputs , fn , Run (Ok prog , args )) ->
699
694
let out = Process. File fn in
@@ -710,7 +705,7 @@ let rec exec t ~ectx ~dir ~env ~stdout_to ~stderr_to =
710
705
redirect ~ectx ~dir outputs Config. dev_null t ~env ~stdout_to ~stderr_to
711
706
| Progn l ->
712
707
exec_list l ~ectx ~dir ~env ~stdout_to ~stderr_to
713
- | Echo strs -> exec_echo stdout_to (concat strs)
708
+ | Echo strs -> exec_echo stdout_to (String. concat strs ~sep: " " )
714
709
| Cat fn ->
715
710
Io. with_file_in fn ~f: (fun ic ->
716
711
let oc =
Original file line number Diff line number Diff line change @@ -214,3 +214,8 @@ let enumerate_gen s =
214
214
215
215
let enumerate_and = enumerate_gen " and"
216
216
let enumerate_or = enumerate_gen " or"
217
+
218
+ let concat ~sep = function
219
+ | [] -> " "
220
+ | [x] -> x
221
+ | xs -> concat ~sep xs
You can’t perform that action at this time.
0 commit comments