diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 9 |
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])}; _ -> |