New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-20130] SDK no longer finds Genymotion after upgrade to 2.6.0 #7669
Conversation
@@ -286,7 +286,10 @@ function findGenymotion(dir, config, callback) { | |||
if (!player || !fs.existsSync(player)) { | |||
player = path.join(dir, 'player' + exe); | |||
} | |||
if (player && !fs.existsSync(player)) { | |||
if (!fs.existsSync(player) && process.platform != 'win32') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You still need to check if player
is truthy in every if
statement. The path you are setting is OS X specific, so just compare to darwin
. Use !==
instead of !=
.
if (process.platform === 'darwin' && (!player || !fs.existsSync(player))) {
player = path.join(dir, 'player.app', 'Contents', 'MacOS', 'player');
}
if (player && !fs.existsSync(player)) {
player = null;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the darwin fix, but why the truthy check? After line https://github.com/FokkeZB/titanium_mobile/blob/patch-37/node_modules/titanium-sdk/lib/emulators/genymotion.js#L287 it will always be truthy since path.join()
does not resolve and just joins the arguments right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I blame you for the ==
btw, thought I should have corrected it indeed ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with omitting the player
truthiness checks. At least now it works on Linux.
I've slowly been migrating ==
to ===
. There's a lot of code. :)
Can you also please fix master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it works on Linux as it was since the fs.existsSync
on the next line will simply return false, but here's the, uh... "forward port" for master:
Since this is the backport, I suggest fixing master, then backporting both this commit and the fix. |
Thank you! APPROVED |
[TIMOB-20130] SDK no longer finds Genymotion after upgrade to 2.6.0
https://jira.appcelerator.org/browse/TIMOB-20130
Backport for #7649