Skip to content

Commit

Permalink
Fix #197 by printing 'Entering/Leaving directory'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuncer Ayaz committed Apr 3, 2012
1 parent cbfabd6 commit 4a9dae7
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/rebar_core.erl
Expand Up @@ -103,7 +103,14 @@ process_dir(Dir, ParentConfig, Command, DirSet) ->
DirSet; DirSet;


true -> true ->
?DEBUG("Entering ~s\n", [Dir]), AbsDir = filename:absname(Dir),
case processing_base_dir(Dir) of
false ->
?CONSOLE("==> Entering directory `~s'\n", [AbsDir]);
true ->
ok
end,

ok = file:set_cwd(Dir), ok = file:set_cwd(Dir),
Config = maybe_load_local_config(Dir, ParentConfig), Config = maybe_load_local_config(Dir, ParentConfig),


Expand All @@ -118,8 +125,17 @@ process_dir(Dir, ParentConfig, Command, DirSet) ->
%% to process this dir. %% to process this dir.
{ok, AvailModuleSets} = application:get_env(rebar, modules), {ok, AvailModuleSets} = application:get_env(rebar, modules),
ModuleSet = choose_module_set(AvailModuleSets, Dir), ModuleSet = choose_module_set(AvailModuleSets, Dir),
maybe_process_dir(ModuleSet, Config, CurrentCodePath, Res = maybe_process_dir(ModuleSet, Config, CurrentCodePath,
Dir, Command, DirSet) Dir, Command, DirSet),

case processing_base_dir(Dir) of
false ->
?CONSOLE("==> Leaving directory `~s'\n", [AbsDir]);
true ->
ok
end,

Res
end. end.


maybe_process_dir({[], undefined}=ModuleSet, Config, CurrentCodePath, maybe_process_dir({[], undefined}=ModuleSet, Config, CurrentCodePath,
Expand Down

0 comments on commit 4a9dae7

Please sign in to comment.