Github user TimBarham commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/363#discussion_r53779104
--- Diff: cordova-lib/src/cordova/util.js ---
@@ -185,6 +187,22 @@ function listPlatforms(project_dir) {
});
}
+function getInstalledPlatformsWithVersions(project_dir) {
+ var result = {};
+ var platforms_on_fs = listPlatforms(project_dir);
+
+ return Q.all(platforms_on_fs.map(function(p) {
+ return superspawn.maybeSpawn(path.join(project_dir, 'platforms',
p, 'cordova', 'version'), [], { chmod: true })
+ .then(function(v) {
+ result[p] = v || null;
+ }, function(v) {
+ result[p] = v || 'broken';
--- End diff --
Is this what you intended? The parameter `v` here will actually be the
error. In the previous version, `v` was simply ignored (so "version" was always
set to "broken").
---
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]