You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by om...@apache.org on 2015/09/05 05:29:47 UTC
cordova-lib git commit: CB-9560 Issue using plugin restore for
plugins with common dependencies (This closes #288)
Repository: cordova-lib
Updated Branches:
refs/heads/master f68562747 -> 59cac5b69
CB-9560 Issue using plugin restore for plugins with common dependencies (This closes #288)
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/59cac5b6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/59cac5b6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/59cac5b6
Branch: refs/heads/master
Commit: 59cac5b696fc85c1488289c9331a3a27ab9140cd
Parents: f685627
Author: Marcus Pridham <ma...@sap.com>
Authored: Wed Aug 26 14:37:32 2015 -0400
Committer: Omar Mefire <om...@gmail.com>
Committed: Fri Sep 4 20:28:07 2015 -0700
----------------------------------------------------------------------
cordova-lib/src/cordova/restore-util.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/59cac5b6/cordova-lib/src/cordova/restore-util.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/restore-util.js b/cordova-lib/src/cordova/restore-util.js
index aa3e9d2..bbcead8 100644
--- a/cordova-lib/src/cordova/restore-util.js
+++ b/cordova-lib/src/cordova/restore-util.js
@@ -90,7 +90,11 @@ function installPluginsFromConfigXML(args) {
return Q.all('No config.xml plugins to install');
}
- var promises = plugins.map(function(featureId) {
+ // CB-9560 : Run `plugin add` serially, one plugin after another
+ // We need to wait for the plugin and its dependencies to be installed
+ // before installing the next root plugin otherwise we can have common
+ // plugin dependencies installed twice which throws a nasty error.
+ return promiseutil.Q_chainmap_graceful(plugins, function(featureId) {
var pluginPath = path.join(plugins_dir, featureId);
if (fs.existsSync(pluginPath)) {
// Plugin already exists
@@ -111,5 +115,4 @@ function installPluginsFromConfigXML(args) {
};
return plugin('add', installFrom, options);
});
- return Q.allSettled(promises);
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org