Do not warn if pre_/post_ cmd is not available

This commit is contained in:
Tuncer Ayaz 2011-07-06 21:22:04 +02:00
parent 0f08e768a7
commit 1ec92ebac3

View file

@ -241,8 +241,15 @@ execute_plugin_hook(Hook, Command, Modules, Config, ModuleFile) ->
execute(Command, Modules, Config, ModuleFile) -> execute(Command, Modules, Config, ModuleFile) ->
case select_modules(Modules, Command, []) of case select_modules(Modules, Command, []) of
[] -> [] ->
Cmd = atom_to_list(Command),
case lists:prefix("pre_", Cmd)
orelse lists:prefix("post_", Cmd) of
true ->
ok;
false ->
?WARN("'~p' command does not apply to directory ~s\n", ?WARN("'~p' command does not apply to directory ~s\n",
[Command, rebar_utils:get_cwd()]); [Command, rebar_utils:get_cwd()])
end;
TargetModules -> TargetModules ->
%% Provide some info on where we are %% Provide some info on where we are