summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_prv_help.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rebar_prv_help.erl b/src/rebar_prv_help.erl
index f3302c3..33bfa2c 100644
--- a/src/rebar_prv_help.erl
+++ b/src/rebar_prv_help.erl
@@ -39,9 +39,14 @@ do(State) ->
help(State);
Name ->
Providers = rebar_state:providers(State),
- providers:help(Name, Providers)
- end,
- {ok, State}.
+ case providers:get_provider(Name, Providers) of
+ [] ->
+ {error, io_lib:format("Unknown task ~s", [Name])};
+ Provider ->
+ providers:help(Provider),
+ {ok, State}
+ end
+ end.
%%
%% print help/usage string