Skip to content

Fix tns doctor command when javac is not added to PATH #821

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

Merged
merged 1 commit into from
Aug 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/common
Submodule common updated 1 files
+2 −2 sysinfo.ts
5 changes: 3 additions & 2 deletions lib/services/doctor-service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///<reference path="../.d.ts"/>
"use strict";
import {EOL} from "os";
import * as semver from "semver";
import * as helpers from "../common/helpers";

class DoctorService implements IDoctorService {
private static MIN_SUPPORTED_GRADLE_VERSION = "2.3";
Expand Down Expand Up @@ -70,7 +70,8 @@ class DoctorService implements IDoctorService {
this.$logger.out("You will not be able to build your projects for Android or run them in the emulator or on a connected device." + EOL
+ "To be able to build for Android and run apps in the emulator on on a connected device, verify that you have installed Gradle.");
}
if(sysInfo.gradleVer && semver.lt(sysInfo.gradleVer, DoctorService.MIN_SUPPORTED_GRADLE_VERSION)) {

if(sysInfo.gradleVer && helpers.versionCompare(sysInfo.gradleVer, DoctorService.MIN_SUPPORTED_GRADLE_VERSION) === -1) {
this.$logger.warn(`WARNING: Gradle version is lower than ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION}.`);
this.$logger.out("You will not be able to build your projects for Android or run them in the emulator or on a connected device." + EOL
+ `To be able to build for Android and run apps in the emulator on on a connected device, verify thqt you have at least ${DoctorService.MIN_SUPPORTED_GRADLE_VERSION} version installed.`);
Expand Down