From ce74846e4e6a481e67de6872008bcbf3d502aa4b Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 20 Aug 2010 10:42:02 -0600 Subject: [PATCH] Fix bug 499; do not delete dependencies that are not in the deps/ directory --- src/rebar_deps.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl index 8f1626a..1e344a7 100644 --- a/src/rebar_deps.erl +++ b/src/rebar_deps.erl @@ -116,10 +116,12 @@ compile(Config, AppFile) -> ok. 'delete-deps'(Config, _) -> - %% Delete all the available deps, if any + %% Delete all the available deps in our deps/ directory, if any + DepsDir = get_deps_dir(), Deps = rebar_config:get_local(Config, deps, []), {AvailableDeps, _} = find_deps(Deps), - [delete_dep(D) || D <- AvailableDeps], + [delete_dep(D) || D <- AvailableDeps, + lists:prefix(DepsDir, D#dep.dir) == true], ok.