summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-12-21 14:47:55 -0500
committerFred Hebert <mononcqc@ferd.ca>2014-12-21 14:47:55 -0500
commit54a41ca6c4fb819aa5adf4883f51d0c785a56be3 (patch)
tree3cdd87e1e733d8e0b87f99456b90b3c58872d473 /src
parent73676c80b06bd4a26040b41f42fee8dde536dcac (diff)
Tests and fixes for namespaces
Diffstat (limited to 'src')
-rw-r--r--src/rebar_core.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index cfe040a..c3a8951 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -54,8 +54,13 @@ process_command(State, Command) ->
undefined ->
%% On the first run (Namespace = undefined), we use the
%% unfound command name to be a namespace.
- do([{default, do} | TargetProviders],
- rebar_state:namespace(State, Command));
+ case providers:get_providers_by_namespace(Command, Providers) of
+ [] ->
+ {error, io_lib:format("Command ~p not found", [Command])};
+ _ ->
+ do([{default, do} | TargetProviders],
+ rebar_state:namespace(State, Command))
+ end;
default ->
{error, io_lib:format("Command ~p not found", [Command])};
_ ->