CB-10708 Install/uninstall plugins correctly into CLI project using plugman


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

Branch: refs/heads/common-1.1.x
Commit: 8f15136e8892ee7f6d93b0249d2d0e9b26f9eb94
Parents: 0aef892
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Authored: Sat Feb 27 15:29:08 2016 +0300
Committer: Vladimir Kotikov <v-vlk...@microsoft.com>
Committed: Sat Feb 27 15:41:26 2016 +0300

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


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8f15136e/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js 
b/cordova-lib/src/plugman/install.js
index 53f37ef..ff02f1c 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -385,6 +385,11 @@ function runInstall(actions, platform, project_dir, 
plugin_dir, plugins_dir, opt
                     nohooks: options.nohooks
                 };
 
+                // CB-10708 This is the case when we're trying to install 
plugin using plugman to specific
+                // platform inside of the existing CLI project. In this case 
we need to put plugin's files
+                // into platform_www but plugman CLI doesn't allow us to do 
that, so we set it here
+                options.usePlatformWww = true;
+
                 var hooksRunner = new HooksRunner(projectRoot);
 
                 return hooksRunner.fire('before_plugin_install', 
hookOptions).then(function() {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8f15136e/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js 
b/cordova-lib/src/plugman/uninstall.js
index bf136eb..f481950 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -303,6 +303,11 @@ function runUninstallPlatform(actions, platform, 
project_dir, plugin_dir, plugin
             }
         };
 
+        // CB-10708 This is the case when we're trying to uninstall plugin 
using plugman from specific
+        // platform inside of the existing CLI project. This option is usually 
set by cordova-lib for CLI projects
+        // but since we're running this code through plugman, we need to set 
it here implicitly
+        options.usePlatformWww = true;
+
         var hooksRunner = new HooksRunner(projectRoot);
 
         return promise.then(function() {


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

Reply via email to