If we have more than one iOS simulator directory then try filtering out any that doesn't have an Applications folder

This commit is contained in:
Erlend Halvorsen
2014-07-31 16:11:57 +02:00
parent 3c1914ba9d
commit 2085253133

View File

@@ -472,6 +472,17 @@ iOSController._getFullPath = function (remotePath, cb) {
logger.warn("There were multiple simulator roots for version " + v + ". " +
"We may be pulling the file from the one you're not using!");
}
if (simRoots.length > 1) {
var filteredSimRoots = simRoots.filter(function (root) {
return fs.existsSync(root + "/Applications");
});
if (filteredSimRoots.length > 0) {
simRoots = filteredSimRoots;
}
}
var basePath = simRoots[0];
var appName = null;