summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-10-22 18:26:52 -0500
committerTristan Sloughter <t@crashfast.com>2014-10-22 18:36:10 -0500
commit774706b15e530fe352cd213908c416d58e10db0e (patch)
tree9b5058711e104fc66050864ca000b7d6cab76ece
parent8c0212d6d3f938ed4a9cfc24828b98224619d475 (diff)
output error on bad provider attempting to be added
-rw-r--r--src/rebar_state.erl9
1 files 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) ->