summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-03-16 18:20:47 -0400
committerFred Hebert <mononcqc@ferd.ca>2015-03-16 18:20:47 -0400
commitc38e50136d0890235814e84d08e8589c505f6658 (patch)
tree60ff58b1f854fd54c23614a193695c4ca78c8c82
parent76143ec02921e91e4fc865d9b45617089f6526ad (diff)
parentae004ad234412a68a60e127677fa26ec747279f3 (diff)
Merge pull request #276 from tsloughter/flatten_command
flatten command to open_port so <17 Erlangs are happy
-rw-r--r--src/rebar_utils.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 7119fa0..2f27fd3 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -116,7 +116,7 @@ sh_send(Command0, String, Options0) ->
Options = [expand_sh_flag(V)
|| V <- proplists:compact(Options0 ++ DefaultOptions)],
- Command = patch_on_windows(Command0, proplists:get_value(env, Options, [])),
+ Command = lists:flatten(patch_on_windows(Command0, proplists:get_value(env, Options, []))),
PortSettings = proplists:get_all_values(port_settings, Options) ++
[exit_status, {line, 16384}, use_stdio, stderr_to_stdout, hide],
Port = open_port({spawn, Command}, PortSettings),
@@ -145,10 +145,10 @@ sh(Command0, Options0) ->
ErrorHandler = proplists:get_value(error_handler, Options),
OutputHandler = proplists:get_value(output_handler, Options),
- Command = patch_on_windows(Command0, proplists:get_value(env, Options, [])),
+ Command = lists:flatten(patch_on_windows(Command0, proplists:get_value(env, Options, []))),
PortSettings = proplists:get_all_values(port_settings, Options) ++
[exit_status, {line, 16384}, use_stdio, stderr_to_stdout, hide],
- ?DEBUG("Port Cmd: ~p\nPort Opts: ~p\n", [Command, PortSettings]),
+ ?DEBUG("Port Cmd: ~s\nPort Opts: ~p\n", [Command, PortSettings]),
Port = open_port({spawn, Command}, PortSettings),
case sh_loop(Port, OutputHandler, []) of