diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 9 | ||||
-rw-r--r-- | src/rebar_deps.erl | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 43f7c5c..55778b7 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -399,18 +399,19 @@ update_code_path(Config) -> [] -> no_change; Paths -> - OldPath = code:get_path(), LibPaths = expand_lib_dirs(Paths, rebar_utils:get_cwd(), []), ok = code:add_pathsa(LibPaths), - {old, OldPath} + %% track just the paths we added, so we can remove them without + %% removing other paths added by this dep + {added, LibPaths} end. restore_code_path(no_change) -> ok; -restore_code_path({old, Path}) -> +restore_code_path({added, Paths}) -> %% Verify that all of the paths still exist -- some dynamically %% added paths can get blown away during clean. - true = code:set_path([F || F <- Path, erl_prim_loader_is_file(F)]), + [code:del_path(F) || F <- Paths, erl_prim_loader_is_file(F)], ok. erl_prim_loader_is_file(File) -> diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index 39510da..9911841 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -573,7 +573,7 @@ update_source1(AppDir, {git, _Url, {branch, Branch}}) -> ?FMT("git pull --ff-only --no-rebase -q origin ~s", [Branch]),ShOpts); update_source1(AppDir, {git, _Url, {tag, Tag}}) -> ShOpts = [{cd, AppDir}], - rebar_utils:sh("git fetch --tags origin", ShOpts), + rebar_utils:sh("git fetch origin", ShOpts), rebar_utils:sh(?FMT("git checkout -q ~s", [Tag]), ShOpts); update_source1(AppDir, {git, _Url, Refspec}) -> ShOpts = [{cd, AppDir}], |