Skip to content
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-26173] Add default Android Studio SDK install paths to lookup #38

Merged
merged 3 commits into from Jul 11, 2018

Conversation

ewanharris
Copy link
Contributor

@ewanharris ewanharris requested a review from cb1kenobi July 2, 2018 11:31
lib/android.js Outdated
@@ -121,15 +121,15 @@ exports.detect = function detect(config, opts, finished) {

// scan various paths
var dirs = process.platform === 'win32'
? [ '%SystemDrive%', '%ProgramFiles%', '%ProgramFiles(x86)%', '%CommonProgramFiles%', '~' ]
: [ '/opt', '/opt/local', '/usr', '/usr/local', '~' ];
? [ '%SystemDrive%', '%ProgramFiles%', '%ProgramFiles(x86)%', '%CommonProgramFiles%', '~', '%LOCALAPPDATA%/Android' ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this and the other copy of paths be extracted to a common method/constant? We're defining the exact same paths to look at in both cases, aren't we?

It also seems like maybe the sdk/ndk search against these paths should just happen once. I assume there's no easy way to combine them, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed the change to move the dirs out to a common constant. I'm not too sure on the sdk/ndk search, (to me) reading the code it makes more sense to have them separated and I don't think there'd be too much of a gain from searching once?

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @sgtcoolguy you cool with this PR?

@sgtcoolguy sgtcoolguy merged commit 0fab18f into tidev:master Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants