diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-04-02 14:14:38 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-04-03 20:54:34 +0200 |
commit | 4a9dae76a41cf963a56f73ea5a7933f285802fec (patch) | |
tree | f78e93a55ea4c74b81826c4a2f78a6bf68c34c63 /src | |
parent | cbfabd6073e1ff9d818ba9ebf5bab201bdb48ec2 (diff) |
Fix #197 by printing 'Entering/Leaving directory'
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 9a57437..857c95f 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -103,7 +103,14 @@ process_dir(Dir, ParentConfig, Command, DirSet) -> DirSet; 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), Config = maybe_load_local_config(Dir, ParentConfig), @@ -118,8 +125,17 @@ process_dir(Dir, ParentConfig, Command, DirSet) -> %% to process this dir. {ok, AvailModuleSets} = application:get_env(rebar, modules), ModuleSet = choose_module_set(AvailModuleSets, Dir), - maybe_process_dir(ModuleSet, Config, CurrentCodePath, - Dir, Command, DirSet) + Res = maybe_process_dir(ModuleSet, Config, CurrentCodePath, + Dir, Command, DirSet), + + case processing_base_dir(Dir) of + false -> + ?CONSOLE("==> Leaving directory `~s'\n", [AbsDir]); + true -> + ok + end, + + Res end. maybe_process_dir({[], undefined}=ModuleSet, Config, CurrentCodePath, |