summaryrefslogtreecommitdiff
path: root/src/rebar_prv_shell.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 18:12:43 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 18:12:43 -0500
commit0537a0699d01e4ae61dd32db0d964224bf9a1f5e (patch)
tree7baa98fd379b9d6a7e892adbbd783f4b75117067 /src/rebar_prv_shell.erl
parentde77225b49ca1af2e4a90f02ef248a15f1e74081 (diff)
parent12bd412c22fcfaeb752727a6c0098140704078f0 (diff)
Merge pull request #354 from tsloughter/track_code_path
Track code path
Diffstat (limited to 'src/rebar_prv_shell.erl')
-rw-r--r--src/rebar_prv_shell.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl
index ed75b30..b6a85ab 100644
--- a/src/rebar_prv_shell.erl
+++ b/src/rebar_prv_shell.erl
@@ -92,7 +92,9 @@ shell(State) ->
%% times). removes at most the error_logger added by init and the
%% error_logger added by the tty handler
ok = remove_error_handler(3),
- %% add test paths
+ %% Add deps to path
+ code:add_paths(rebar_state:code_paths(State, all_deps)),
+ %% add project app test paths
ok = add_test_paths(State),
%% this call never returns (until user quits shell)
timer:sleep(infinity).
@@ -121,10 +123,9 @@ wait_until_user_started(Timeout) ->
add_test_paths(State) ->
lists:foreach(fun(App) ->
- AppDir = rebar_app_info:out_dir(App),
- %% ignore errors resulting from non-existent directories
- _ = code:add_path(filename:join([AppDir, "ebin"])),
- _ = code:add_path(filename:join([AppDir, "test"]))
- end, rebar_state:project_apps(State)),
+ AppDir = rebar_app_info:out_dir(App),
+ %% ignore errors resulting from non-existent directories
+ _ = code:add_path(filename:join([AppDir, "test"]))
+ end, rebar_state:project_apps(State)),
_ = code:add_path(filename:join([rebar_dir:base_dir(State), "test"])),
ok.