Skip to content

Commit

Permalink
Simctl command now returning isAvailble instead of availblity with li…
Browse files Browse the repository at this point in the history
…st command (#260)
  • Loading branch information
vibhor-ios authored Mar 3, 2020
1 parent bd6e3ba commit 91e0bc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/showsdks.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ShowSdksCommand extends BaseCommand {

let output = 'Simulator SDK Roots:\n'
runtimes.forEach(function (runtime) {
if (runtime.availability === '(available)') {
if ((runtime.availability ? (runtime.availability === '(available)') : runtime.isAvailable)) {
output += `"${runtime.name}" (${runtime.buildversion})\n`
output += '\t(unknown)\n'
}
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function findRuntimesGroupByDeviceProperty (list, deviceProperty, availableOnly,

list.runtimes.forEach(function (runtime) {
// runtime.name should already be normalized, 'identifier' key has the namespaced name
available_runtimes[ runtime.name ] = (runtime.availability === '(available)')
available_runtimes[ runtime.name ] = (runtime.availability ? (runtime.availability === '(available)') : runtime.isAvailable)
})

Object.keys(list.devices).forEach(function (deviceGroup) {
Expand Down Expand Up @@ -308,7 +308,7 @@ function findFirstAvailableDevice (list) {

list.runtimes.forEach(function (runtime) {
// runtime.name should already be normalized, 'identifier' key has the namespaced name
available_runtimes[ runtime.name ] = (runtime.availability === '(available)')
available_runtimes[ runtime.name ] = (runtime.availability ? (runtime.availability === '(available)') : runtime.isAvailable)
})

Object.keys(list.devices).some(function (deviceGroup) {
Expand Down

0 comments on commit 91e0bc6

Please sign in to comment.