mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Fix Dialyzer warning
This commit is contained in:
parent
220eec71f6
commit
5a37149642
1 changed files with 5 additions and 3 deletions
|
@ -166,9 +166,7 @@ expand_sh_flag({abort_on_error, Message}) ->
|
||||||
end};
|
end};
|
||||||
expand_sh_flag(abort_on_error) ->
|
expand_sh_flag(abort_on_error) ->
|
||||||
{error_handler,
|
{error_handler,
|
||||||
fun(Command, Rc) ->
|
fun log_and_abort/2};
|
||||||
?ABORT("~s failed with error: ~w\n", [Command, Rc])
|
|
||||||
end};
|
|
||||||
expand_sh_flag(use_stdout) ->
|
expand_sh_flag(use_stdout) ->
|
||||||
{output_handler,
|
{output_handler,
|
||||||
fun(Line, Acc) ->
|
fun(Line, Acc) ->
|
||||||
|
@ -185,6 +183,10 @@ expand_sh_flag({cd, Dir}) ->
|
||||||
expand_sh_flag({env, Env}) ->
|
expand_sh_flag({env, Env}) ->
|
||||||
{port_settings, {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) ->
|
sh_loop(Port, Fun, Acc) ->
|
||||||
receive
|
receive
|
||||||
{Port, {data, {_, "_port_cmd_status_ " ++ Status}}} ->
|
{Port, {data, {_, "_port_cmd_status_ " ++ Status}}} ->
|
||||||
|
|
Loading…
Reference in a new issue