Skip to content

TNS 2.00 & Macintosh without Java/Android configured #1732

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

Closed
NathanaelA opened this issue Apr 28, 2016 · 7 comments
Closed

TNS 2.00 & Macintosh without Java/Android configured #1732

NathanaelA opened this issue Apr 28, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@NathanaelA
Copy link
Contributor

This is a annoying regression in the CLI on macs.

TNS run ios, tns debug ios, tns deploy ios, tns emulate ios, and tns prepare ios
See the commonality. ;-)

I do all my Android development on my PC, and so my mac is not configured for even java or Android.

Now when ever a plugin is updated, installed or manually changed the TNS command will now spit out the following:

The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.
To be able to perform Android build-related operations, set the ANDROID_HOME variable to point to the root of your Android SDK installation directory.

Ok, so that is just annoyingly pointless verbage since I asked for a iOS build. But the real regression is that it checks the Java version. Does anyone remember what happens when you don't have Java installed on a Mac osx box. You get one of these:
java-missing-osx

Do you have ANY idea how frustrating that is to have popup frequently... Argh....

@enchev
Copy link
Contributor

enchev commented Jun 1, 2016

Hey @NathanaelA,

I've just tried this on my Mac where ANDROID_HOME is not configured at all however all commands worked as expected. I'm using CLI 2.0.1. As far as I know tns doctor will show this message.

@NathanaelA

This comment was marked as abuse.

@enchev
Copy link
Contributor

enchev commented Jun 1, 2016

No. I've tested this on Mac with no Java installed.

@NathanaelA

This comment was marked as abuse.

@rosen-vladimirov
Copy link
Contributor

I believe @vakrilov had faced the same issue, so we'll investigate it further. Not sure what's causing this behavior.

@vakrilov
Copy link

vakrilov commented Jun 1, 2016

I confirm. On a Mac with no Java -> I get the popup every time i build.

@enchev
Copy link
Contributor

enchev commented Jun 2, 2016

Ok. We've found what's causing the problem. This code was intended initially to be called only from tns doctor (post install) however now is used in various services during build/prepare. The class/method should be split to two platform independent classes/methods to avoid further problems.

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

No branches or pull requests

4 participants