mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Use delayed_halt everywhere
This commit is contained in:
parent
c86c99940d
commit
ebdb25c5cc
2 changed files with 5 additions and 5 deletions
|
@ -54,12 +54,12 @@ main(Args) ->
|
||||||
ok ->
|
ok ->
|
||||||
ok;
|
ok;
|
||||||
{error, failed} ->
|
{error, failed} ->
|
||||||
halt(1);
|
rebar_utils:delayed_halt(1);
|
||||||
Error ->
|
Error ->
|
||||||
%% Nothing should percolate up from rebar_core;
|
%% Nothing should percolate up from rebar_core;
|
||||||
%% Dump this error to console
|
%% Dump this error to console
|
||||||
io:format("Uncaught error in rebar_core: ~p\n", [Error]),
|
io:format("Uncaught error in rebar_core: ~p\n", [Error]),
|
||||||
halt(1)
|
rebar_utils:delayed_halt(1)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% ====================================================================
|
%% ====================================================================
|
||||||
|
@ -186,7 +186,7 @@ parse_args(Args) ->
|
||||||
{error, {Reason, Data}} ->
|
{error, {Reason, Data}} ->
|
||||||
?ERROR("~s ~p~n~n", [Reason, Data]),
|
?ERROR("~s ~p~n~n", [Reason, Data]),
|
||||||
help(),
|
help(),
|
||||||
halt(1)
|
rebar_utils:delayed_halt(1)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -233,7 +233,7 @@ show_info_maybe_halt(Opts, NonOptArgs) ->
|
||||||
[] ->
|
[] ->
|
||||||
?CONSOLE("No command to run specified!~n",[]),
|
?CONSOLE("No command to run specified!~n",[]),
|
||||||
help(),
|
help(),
|
||||||
halt(1);
|
rebar_utils:delayed_halt(1);
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -139,7 +139,7 @@ ensure_dir(Path) ->
|
||||||
|
|
||||||
-spec abort() -> no_return().
|
-spec abort() -> no_return().
|
||||||
abort() ->
|
abort() ->
|
||||||
delayed_halt(1).
|
throw(rebar_abort).
|
||||||
|
|
||||||
-spec abort(string(), [term()]) -> no_return().
|
-spec abort(string(), [term()]) -> no_return().
|
||||||
abort(String, Args) ->
|
abort(String, Args) ->
|
||||||
|
|
Loading…
Reference in a new issue