diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-04-22 18:12:43 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-04-22 18:12:43 -0500 |
commit | 0537a0699d01e4ae61dd32db0d964224bf9a1f5e (patch) | |
tree | 7baa98fd379b9d6a7e892adbbd783f4b75117067 /src/rebar_api.erl | |
parent | de77225b49ca1af2e4a90f02ef248a15f1e74081 (diff) | |
parent | 12bd412c22fcfaeb752727a6c0098140704078f0 (diff) |
Merge pull request #354 from tsloughter/track_code_path
Track code path
Diffstat (limited to 'src/rebar_api.erl')
-rw-r--r-- | src/rebar_api.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rebar_api.erl b/src/rebar_api.erl index 3fc7f61..a398b53 100644 --- a/src/rebar_api.erl +++ b/src/rebar_api.erl @@ -8,7 +8,9 @@ debug/2, info/2, warn/2, error/2, expand_env_variable/3, get_arch/0, - wordsize/0]). + wordsize/0, + add_deps_to_path/1, + restore_code_path/1]). -export_type([rebar_dict/0, rebar_digraph/0]). @@ -48,3 +50,12 @@ get_arch() -> wordsize() -> rebar_utils:wordsize(). + + +%% Add deps to the code path +add_deps_to_path(State) -> + code:add_paths(rebar_state:code_paths(State, all_deps)). + +%% Revert to only having the beams necessary for running rebar3 and plugins in the path +restore_code_path(State) -> + rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)). |