Updated Branches: refs/heads/master b421b7b19 -> 799169e1c
0.9.3. uninstallPlugin should not complain if a certain plugin repo is gone already. Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/799169e1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/799169e1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/799169e1 Branch: refs/heads/master Commit: 799169e1cf1f29820f197d4f579c2b3382d9ff1a Parents: b421b7b Author: Fil Maj <[email protected]> Authored: Thu Jul 11 15:22:50 2013 -0700 Committer: Fil Maj <[email protected]> Committed: Thu Jul 11 15:22:50 2013 -0700 ---------------------------------------------------------------------- package.json | 2 +- src/uninstall.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/799169e1/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 1c0f0d6..f365efd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Andrew Lunny <[email protected]>", "name": "plugman", "description": "install/uninstall Cordova plugins", - "version": "0.9.2", + "version": "0.9.3", "repository": { "type": "git", "url": "git://git-wip-us.apache.org/repos/asf/cordova-plugman.git" http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/799169e1/src/uninstall.js ---------------------------------------------------------------------- diff --git a/src/uninstall.js b/src/uninstall.js index 3b56b3c..9bc6666 100644 --- a/src/uninstall.js +++ b/src/uninstall.js @@ -44,6 +44,11 @@ module.exports.uninstallPlatform = function(platform, project_dir, id, plugins_d module.exports.uninstallPlugin = function(id, plugins_dir, callback) { var plugin_dir = path.join(plugins_dir, id); + // If already removed, skip. + if (!fs.existsSync(plugin_dir)) { + if (callback) callback(); + return; + } var xml_path = path.join(plugin_dir, 'plugin.xml') , plugin_et = xml_helpers.parseElementtreeSync(xml_path);
