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

Respect ANDROID_HOME if set #48

Merged
merged 4 commits into from
Jan 2, 2014
Merged

Respect ANDROID_HOME if set #48

merged 4 commits into from
Jan 2, 2014

Conversation

Arcterus
Copy link
Contributor

If the SDK path is determined like this, then it will be more user-friendly (I won't have to restructure my path just to get pindah to work).

abort "\"android\" executable not found on $PATH" if tools.nil?
real_location = Pathname.new("#{tools}/android").realpath.dirname
File.expand_path("#{real_location}/..")
if ENV["ANDROID_HOME"] == "" then
Copy link
Member

Choose a reason for hiding this comment

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

Could you change this to check for falsyness? When an ENV var isn't set, it's nil. Maybe something like:

return ENV["ANDROID_HOME"] if ENV["ANDROID_HOME"]

followed by the original implementation would be better.

@Arcterus
Copy link
Contributor Author

Sorry, I haven't used Ruby in a while. :)

@AtomicPair
Copy link
Contributor

Thanks for the contribution, @Arcterus!

I have a few other code changes staged for the upcoming 0.1.3 release this week, so let me review this before I merge your changes into master so we don't have any conflicts. :-)

@ghost ghost assigned AtomicPair Jan 1, 2014
@AtomicPair AtomicPair merged commit f3315f6 into mirah:master Jan 2, 2014
@AtomicPair
Copy link
Contributor

LOL, no worries, @Arcterus! I've merged your change into master. Let me know if it doesn't work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants