summaryrefslogtreecommitdiff
path: root/src/rebar_prv_do.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-06-19 21:35:36 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-06-19 21:35:36 -0500
commit312b55700597525a28d8279c7554a27933d117d2 (patch)
treeb26a0258ef7631a60e4b0f4fb80e9ba82880bbca /src/rebar_prv_do.erl
parent7675a4d33ff09a0014982811e0b38e72ac6d50e4 (diff)
parent5a6b551eb51853c2297d74bac2c9e9c14a2d4409 (diff)
Merge pull request #529 from tsloughter/ns_help
print help for namespaces
Diffstat (limited to 'src/rebar_prv_do.erl')
-rw-r--r--src/rebar_prv_do.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rebar_prv_do.erl b/src/rebar_prv_do.erl
index 35e85c2..f850135 100644
--- a/src/rebar_prv_do.erl
+++ b/src/rebar_prv_do.erl
@@ -33,8 +33,16 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
- Tasks = rebar_utils:args_to_tasks(rebar_state:command_args(State)),
- do_tasks(Tasks, State).
+ case rebar_utils:args_to_tasks(rebar_state:command_args(State)) of
+ [] ->
+ AllProviders = rebar_state:providers(State),
+ Namespace = rebar_state:namespace(State),
+ Providers = providers:get_providers_by_namespace(Namespace, AllProviders),
+ providers:help(Providers),
+ {ok, State};
+ Tasks ->
+ do_tasks(Tasks, State)
+ end.
do_tasks([], State) ->
{ok, State};