summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-08-20 10:42:02 -0600
committerDave Smith <dizzyd@dizzyd.com>2010-08-20 10:42:02 -0600
commitce74846e4e6a481e67de6872008bcbf3d502aa4b (patch)
tree888c0d58ca80314d69be3f20fba0012966fe9806
parented59ed2b52a1e5587c949ce96fd4c2b39e19f609 (diff)
Fix bug 499; do not delete dependencies that are not in the deps/ directory
-rw-r--r--src/rebar_deps.erl6
1 files 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.