Skip to content

Commit 0286007

Browse files
committed
Fixes #153 - ios-sim 4.x - showsdks output is not backwards compatible
1 parent ccae6ae commit 0286007

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/commands.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,16 @@ var command_lib = {
237237
},
238238

239239
showsdks : function(args) {
240-
var options = { 'runtimes' : true };
241-
simctl.list(options);
240+
var options = { silent: true, runtimes: true };
241+
var list = simctl.list(options).json;
242+
243+
console.log("Simulator SDK Roots:");
244+
list.runtimes.forEach(function(runtime) {
245+
if (runtime.available) {
246+
console.log(util.format("'%s' (%s)", runtime.name, runtime.build));
247+
console.log(util.format("\t(unknown)"));
248+
}
249+
});
242250
},
243251

244252
showdevicetypes : function(args) {

0 commit comments

Comments
 (0)