Add simple warning if no modules are interested in handling a command for a given directory

This commit is contained in:
Dave Smith 2010-04-17 07:34:54 -06:00
parent 66906bc39e
commit 266d82f871

View file

@ -264,6 +264,7 @@ process_dir(Dir, ParentConfig, Commands) ->
ok = file:set_cwd(Dir),
%% Finally, process the current working directory
?DEBUG("Commands: ~p Modules: ~p\n", [Commands, Modules]),
apply_commands(Commands, Modules, UpdatedConfig, ModuleSetFile),
%% Once we're all done processing, reset the code path to whatever
@ -306,6 +307,8 @@ apply_commands([], _Modules, _Config, _ModuleFile) ->
apply_commands([Command | Rest], Modules, Config, ModuleFile) ->
case select_modules(Modules, Command, []) of
[] ->
?CONSOLE("WARNING: ~p command does not apply to directory ~s\n",
[Command, rebar_utils:get_cwd()]),
apply_commands(Rest, Modules, Config, ModuleFile);
TargetModules ->
%% Provide some info on where we are