cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-lib git commit: CB-11164 Allow forced dependent plugin removal
Date Sat, 04 Jun 2016 00:26:19 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 4b30b73b0 -> c7f8b8c6e


CB-11164 Allow forced dependent plugin removal

 This closes #451


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

Branch: refs/heads/master
Commit: c7f8b8c6e02ac7e5bd7b2ce5937b47dfcbb94e5f
Parents: 4b30b73
Author: carynbear <caryn.tran@berkeley.edu>
Authored: Thu Jun 2 14:44:43 2016 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Fri Jun 3 17:19:00 2016 -0700

----------------------------------------------------------------------
 cordova-lib/src/cordova/plugin.js    | 5 ++++-
 cordova-lib/src/plugman/uninstall.js | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c7f8b8c6/cordova-lib/src/cordova/plugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/plugin.js b/cordova-lib/src/cordova/plugin.js
index cf7fdac..e8d6acb 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -267,7 +267,10 @@ module.exports = function plugin(command, targets, opts) {
                             return soFar.then(function() {
                                 var platformRoot = path.join(projectRoot, 'platforms', platform);
                                 events.emit('verbose', 'Calling plugman.uninstall on plugin
"' + target + '" for platform "' + platform + '"');
-                                return plugman.raw.uninstall.uninstallPlatform(platform,
platformRoot, target, pluginPath)
+                                var options = {
+                                    force: opts.force || false
+                                };
+                                return plugman.raw.uninstall.uninstallPlatform(platform,
platformRoot, target, pluginPath, options)
                                 .then(function (didPrepare) {
                                     // If platform does not returned anything we'll need
                                     // to trigger a prepare after all plugins installed

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c7f8b8c6/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
index c987d49..06b02f5 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -269,7 +269,7 @@ function runUninstallPlatform(actions, platform, project_dir, plugin_dir,
plugin
         if(options.force) {
             events.emit('warn', msg + ' but forcing removal');
         } else {
-            return Q.reject( new CordovaError(msg + ', skipping uninstallation.') );
+            return Q.reject( new CordovaError(msg + ', skipping uninstallation. (try --force
if trying to update)') );
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message