diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-10-10 18:40:08 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-10-10 18:40:08 -0500 |
commit | ae40b253c00362907f275f01f53a39f6b0c600eb (patch) | |
tree | 2f41c212ea094282e32a6308ddc7921a371f39b8 | |
parent | f77e5659625eedb919f0c5d477da79b3ecaa32f0 (diff) |
handle unknown provider asked for help
-rw-r--r-- | src/rebar_prv_help.erl | 11 |
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 |