Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FCD210AFF for ; Wed, 10 Jul 2013 18:09:45 +0000 (UTC) Received: (qmail 67131 invoked by uid 500); 10 Jul 2013 18:09:44 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 67054 invoked by uid 500); 10 Jul 2013 18:09:44 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 67023 invoked by uid 99); 10 Jul 2013 18:09:42 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 18:09:42 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3432888C1C0; Wed, 10 Jul 2013 18:09:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: filmaj@apache.org To: commits@cordova.apache.org Date: Wed, 10 Jul 2013 18:09:43 -0000 Message-Id: <6232c08edbd44362a3c8dae1ca2edec5@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: [CB-4077] Separate the actions of removing a plugin from a platform and removing the plugin entirely [CB-4077] Separate the actions of removing a plugin from a platform and removing the plugin entirely Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/f577c4dd Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/f577c4dd Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/f577c4dd Branch: refs/heads/CB-4077 Commit: f577c4dd1c7e751b64abc0317eded567882bc1a3 Parents: 6773ecd Author: Ian Clelland Authored: Fri Jul 5 10:49:51 2013 -0400 Committer: Ian Clelland Committed: Wed Jul 10 09:44:39 2013 -0400 ---------------------------------------------------------------------- src/plugin.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f577c4dd/src/plugin.js ---------------------------------------------------------------------- diff --git a/src/plugin.js b/src/plugin.js index ca43e35..a280277 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -138,17 +138,17 @@ module.exports = function plugin(command, targets, callback) { else return true; }); - // Iterate over all the common platforms between the plugin - // and the app, and uninstall. - // If this is a web-only plugin with no platform tags, this step - // is not needed and we just --remove the plugin below. - intersection.forEach(function(platform) { + // Iterate over all installed platforms and uninstall. + // If this is a web-only or dependency-only plugin, then + // there may be nothing to do here except remove the + // reference from the platform's plugin config JSON. + platformList.forEach(function(platform) { var platformRoot = path.join(projectRoot, 'platforms', platform); var parser = new platforms[platform].parser(platformRoot); events.emit('log', 'Calling plugman.uninstall on plugin "' + target + '" for platform "' + platform + '"'); - plugman.uninstall((platform=='blackberry'?'blackberry10':platform), platformRoot, target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() }); + plugman.uninstall.uninstallPlatform((platform=='blackberry'?'blackberry10':platform), platformRoot, target, path.join(projectRoot, 'plugins'), { www_dir: parser.staging_dir() }); }); - end(); + plugman.uninstall.uninstallPlugin(target, path.join(projectRoot, 'plugins'), end); } else { var err = new Error('Plugin "' + target + '" not added to project.'); if (callback) callback(err);