Skip to content

Commit

Permalink
Merge pull request #103 from ewanharris/TIMOB-27490
Browse files Browse the repository at this point in the history
fix: add executable information to simulator when looping over xcodes
  • Loading branch information
cb1kenobi committed Oct 22, 2019
2 parents 68999e6 + 6a11a53 commit 520cedd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,19 @@ function detect(options, callback) {
runtimeLookup[runtime.identifier] = {
name: runtime.name,
version: runtime.version,
simctl: xc.executables.simctl,
simulator: xc.executables[/watch/i.test(xc.simRuntimes[runtime.version].name) ? 'watchsimulator' : 'simulator'],
xcodeIds: []
};
}
xcodeIds.forEach(function (xcodeId) {
var xc = xcodeInfo.xcode[xcodeId];
if (xc.simRuntimes[runtime.version] && runtimeLookup[runtime.identifier].xcodeIds.indexOf(xcodeId) === -1) {
runtimeLookup[runtime.identifier].xcodeIds.push(xcodeId);
if (!runtimeLookup[runtime.identifier].simctl) {
runtimeLookup[runtime.identifier].simctl = xc.executables.simctl;
}
if (!runtimeLookup[runtime.identifier].simulator) {
runtimeLookup[runtime.identifier].simulator= xc.executables[/watch/i.test(xc.simRuntimes[runtime.version].name) ? 'watchsimulator' : 'simulator'];
}
}
});
}
Expand Down

0 comments on commit 520cedd

Please sign in to comment.