Fix bug 499; do not delete dependencies that are not in the deps/ directory

This commit is contained in:
Dave Smith 2010-08-20 10:42:02 -06:00
parent ed59ed2b52
commit ce74846e4e

View file

@ -116,10 +116,12 @@ compile(Config, AppFile) ->
ok. ok.
'delete-deps'(Config, _) -> '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, []), Deps = rebar_config:get_local(Config, deps, []),
{AvailableDeps, _} = find_deps(Deps), {AvailableDeps, _} = find_deps(Deps),
[delete_dep(D) || D <- AvailableDeps], [delete_dep(D) || D <- AvailableDeps,
lists:prefix(DepsDir, D#dep.dir) == true],
ok. ok.