diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-07 12:48:22 +0100 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-09 09:46:08 +0100 |
commit | 5a371496422a60b6ce6d409d680ea9107eefb019 (patch) | |
tree | f884d653164ae48c079a7ee2ccfa43bdfa5eb4a2 | |
parent | 220eec71f6f83e611dad1238c5f5b47d6ef99c22 (diff) |
Fix Dialyzer warning
-rw-r--r-- | src/rebar_utils.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 7dbb8f7..17fb95a 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -166,9 +166,7 @@ expand_sh_flag({abort_on_error, Message}) -> end}; expand_sh_flag(abort_on_error) -> {error_handler, - fun(Command, Rc) -> - ?ABORT("~s failed with error: ~w\n", [Command, Rc]) - end}; + fun log_and_abort/2}; expand_sh_flag(use_stdout) -> {output_handler, fun(Line, Acc) -> @@ -185,6 +183,10 @@ expand_sh_flag({cd, Dir}) -> expand_sh_flag({env, Env}) -> {port_settings, {env, Env}}. +-spec log_and_abort(string(), integer()) -> no_return(). +log_and_abort(Command, Rc) -> + ?ABORT("~s failed with error: ~w\n", [Command, Rc]). + sh_loop(Port, Fun, Acc) -> receive {Port, {data, {_, "_port_cmd_status_ " ++ Status}}} -> |