From ae40b253c00362907f275f01f53a39f6b0c600eb Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 10 Oct 2014 18:40:08 -0500 Subject: handle unknown provider asked for help --- src/rebar_prv_help.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.1