From 0c402a8293a888284bc9e3631c671540a7702711 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 23 Feb 2015 08:40:17 -0600 Subject: output hook stdout and don't add extra newline --- src/rebar_hooks.erl | 2 +- src/rebar_utils.erl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_hooks.erl b/src/rebar_hooks.erl index a1a363e..706d6b9 100644 --- a/src/rebar_hooks.erl +++ b/src/rebar_hooks.erl @@ -22,4 +22,4 @@ apply_hook(Dir, Env, {Arch, Command, Hook}) -> end; apply_hook(Dir, Env, {Command, Hook}) -> Msg = lists:flatten(io_lib:format("Hook for ~p failed!~n", [Command])), - rebar_utils:sh(Hook, [{cd, Dir}, {env, Env}, {abort_on_error, Msg}]). + rebar_utils:sh(Hook, [use_stdout, {cd, Dir}, {env, Env}, {abort_on_error, Msg}]). diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index b3ae9ff..ab5167f 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -314,7 +314,8 @@ expand_sh_flag(debug_and_abort_on_error) -> expand_sh_flag(use_stdout) -> {output_handler, fun(Line, Acc) -> - ?CONSOLE("~s", [Line]), + %% Line already has a newline so don't use ?CONSOLE which adds one + io:format("~s", [Line]), [Line | Acc] end}; expand_sh_flag({use_stdout, false}) -> -- cgit v1.1