Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/266#discussion_r35160288 --- 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 more simultaneously by each platform and leads to an exception being thrown + return promiseutil.Q_chainmap_graceful(targets, function(target) { if (target) { events.emit('log', 'Restoring platform ' + target + ' referenced on config.xml'); return cordova.raw.platform('add', target); } return Q(); + }, function(err) { + events.emit('log', err); --- End diff -- Should these be logged as 'error' instead of 'log'
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org