Skip to content

Commit

Permalink
concat Echo args with space rather than blank
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Jun 5, 2018
1 parent add85c7 commit 785939d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/action.ml
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ let rec exec t ~ectx ~dir ~env ~stdout_to ~stderr_to =
exec t ~ectx ~dir ~stdout_to ~stderr_to
~env:(Env.add env ~var ~value)
| Redirect (Stdout, fn, Echo s) ->
Io.write_file fn (String.concat s ~sep:"");
Io.write_file fn (String.concat s ~sep:" ");
Fiber.return ()
| Redirect (outputs, fn, Run (Ok prog, args)) ->
let out = Process.File fn in
Expand All @@ -705,7 +705,7 @@ let rec exec t ~ectx ~dir ~env ~stdout_to ~stderr_to =
redirect ~ectx ~dir outputs Config.dev_null t ~env ~stdout_to ~stderr_to
| Progn l ->
exec_list l ~ectx ~dir ~env ~stdout_to ~stderr_to
| Echo strs -> exec_echo stdout_to (String.concat strs ~sep:"")
| Echo strs -> exec_echo stdout_to (String.concat strs ~sep:" ")
| Cat fn ->
Io.with_file_in fn ~f:(fun ic ->
let oc =
Expand Down
2 changes: 1 addition & 1 deletion src/value.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let paths = List.map ~f:(fun x -> Path x)

let concat ts ~dir =
List.map ~f:(to_string ~dir) ts
|> String.concat ~sep:""
|> String.concat ~sep:" "

let paths_only =
List.filter_map ~f:(function
Expand Down

0 comments on commit 785939d

Please sign in to comment.