Github user vladimir-kotikov commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/266#discussion_r35200567
--- Diff: cordova-lib/src/cordova/restore-util.js ---
@@ -56,24 +57,23 @@ function installPlatformsFromConfigXML(platforms) {
if (!targets || !targets.length) {
return Q.all('No platforms are listed in config.xml to restore');
}
- // Run platform add for all the platforms seperately
+
+
+ // Run `platform add` for all the platforms separately
// so that failure on one does not affect the other.
- var promises = targets.map(function (target) {
+
+ // CB-9278 : Run `platform add` serially, one platform after another
+ // Otherwise, we get a bug where the following line:
https://github.com/apache/cordova-lib/blob/0b0dee5e403c2c6d4e7262b963babb9f532e7d27/cordova-lib/src/util/npm-helper.js#L39
+ // gets executed simultaneously by each platform and leads to an
exception being thrown
+ return promiseutil.Q_chainmap_graceful(targets, function(target) {
if (target) {
--- End diff --
nit: I wonder if `target` can be falsy? Probably this condition is not
required.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]