You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/09/29 22:03:09 UTC

git commit: CB-5390 Uninstall - change order of popping top level plugin id to satisfy tests

Repository: cordova-lib
Updated Branches:
  refs/heads/master 9ca23557a -> 1df6bb67b


CB-5390 Uninstall - change order of popping top level plugin id to satisfy tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/1df6bb67
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/1df6bb67
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/1df6bb67

Branch: refs/heads/master
Commit: 1df6bb67bfc8906d81cafd0f4d9c61fcacfc29c9
Parents: 9ca2355
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Mon Sep 29 16:01:16 2014 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Mon Sep 29 16:01:16 2014 -0400

----------------------------------------------------------------------
 cordova-lib/src/plugman/uninstall.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1df6bb67/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
index b74596f..209e35f 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -118,7 +118,6 @@ module.exports.uninstallPlugin = function(id, plugins_dir, options) {
 
     // Recursively remove plugins which were installed as dependents (that are not top-level)
     var toDelete = [];
-    toDelete.push(top_plugin_id);
     function findDependencies(pluginId) {
         var config = xml_helpers.parseElementtreeSync(path.join(plugin_dir, '..', pluginId, 'plugin.xml')),
             deps = config.findall('.//dependency').map(function (p) { return p.attrib.id; });
@@ -130,6 +129,7 @@ module.exports.uninstallPlugin = function(id, plugins_dir, options) {
         });
     }
     findDependencies(top_plugin_id);
+    toDelete.push(top_plugin_id);
 
     // Okay, now we check if any of these are depended on, or top-level.
     // Find the installed platforms by whether they have a metadata file.