From 774706b15e530fe352cd213908c416d58e10db0e Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Wed, 22 Oct 2014 18:26:52 -0500 Subject: output error on bad provider attempting to be added --- src/rebar_state.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 130f08d..f39251d 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -152,8 +152,13 @@ add_provider(State=#state_t{providers=Providers}, Provider) -> create_logic_providers(ProviderModules, State0) -> lists:foldl(fun(ProviderMod, Acc) -> - {ok, State1} = providers:new(ProviderMod, Acc), - State1 + case providers:new(ProviderMod, Acc) of + {error, Reason} -> + ?ERROR(Reason++"~n", []), + Acc; + {ok, State1} -> + State1 + end end, State0, ProviderModules). prepend_hook(State=#state_t{providers=Providers}, Target, Hook) -> -- cgit v1.1