Skip to content

Commit

Permalink
Handle apple watch simulators
Browse files Browse the repository at this point in the history
The parser fails if apple watch simulators are present on the system.
Parser now stops when it counters a new section.

Signed-off-by: Gorkem Ercan <gorkem.ercan@gmail.com>
  • Loading branch information
gorkem committed Sep 23, 2015
1 parent 5811bd0 commit 88d07ad
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ public List<IOSDevice> getDeviceList(){
continue;
}
if (parsingDevices) {
if (line.startsWith("==") ){
break;
}else
if (line.startsWith("--")) {
line = line.replace("--", "");
iosVersion = line.trim();
} else {
String[] parts = line.split("[\\(\\)]");
if ( parts.length<2 ){
continue;
}
IOSDevice device = new IOSDevice();
device.setDeviceName(parts[0].trim());
device.setDeviceId(parts[1].trim());
Expand Down

0 comments on commit 88d07ad

Please sign in to comment.