You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/04/14 23:19:08 UTC
ios commit: CB-8855 Fix display ios devices with --list (closes #137)
Repository: cordova-ios
Updated Branches:
refs/heads/master e65937339 -> 078a47f3f
CB-8855 Fix display ios devices with --list (closes #137)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/078a47f3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/078a47f3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/078a47f3
Branch: refs/heads/master
Commit: 078a47f3fa250b46b370d43530c040bf4f0ed5cd
Parents: e659373
Author: Carlos Santana <cs...@carloss-mbp.raleigh.ibm.com>
Authored: Tue Apr 14 17:08:06 2015 -0400
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 14 14:18:37 2015 -0700
----------------------------------------------------------------------
bin/templates/scripts/cordova/lib/list-devices | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/078a47f3/bin/templates/scripts/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/list-devices b/bin/templates/scripts/cordova/lib/list-devices
index ddeb0b5..f612096 100755
--- a/bin/templates/scripts/cordova/lib/list-devices
+++ b/bin/templates/scripts/cordova/lib/list-devices
@@ -36,14 +36,16 @@ function listDevices() {
];
// wrap al lexec calls into promises and wait until they're fullfilled
- return Q.all(commands).then(function (promises) {
+ return Q.all(commands).then(function (results) {
var accumulator = [];
- promises.forEach(function (promise) {
- if (promise.state === 'fulfilled') {
- // Each command promise resolves with array [stout, stderr], and we need stdout only
- // Append stdout lines to accumulator
- accumulator.concat(promise.value[0].trim().split('\n'));
- }
+ results.forEach(function (result) {
+ var devicefound;
+ // Each command promise resolves with array [stout, stderr], and we need stdout only
+ // Append stdout lines to accumulator
+ devicefound = result[0].trim().split('\n')[0];
+ if(devicefound !== ''){
+ accumulator.push(devicefound);
+ }
});
return accumulator;
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org