Skip to content

Commit 3cc0d0f

Browse files
committed
Merge pull request #892 from NativeScript/totev/fail-without-help-gradle
Make gradle error more user friendly
2 parents 5fd4986 + 54b57a5 commit 3cc0d0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/services/android-project-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
8080
return (() => {
8181
let frameworkVersion = this.$fs.readJson(path.join(frameworkDir, "../", "package.json")).wait().version;
8282
if(semver.lt(frameworkVersion, AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE)) {
83-
this.$errors.fail(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
83+
this.$errors.failWithoutHelp(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
8484
}
8585

8686
// TODO: Move these check to validate method once we do not support ant.
@@ -390,7 +390,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
390390
private checkGradle(): IFuture<void> {
391391
return (() => {
392392
if(!this.$sysInfo.getSysInfo().gradleVer) {
393-
this.$errors.fail("Error executing commands 'gradle', make sure you have gradle installed and added to your PATH.");
393+
this.$errors.failWithoutHelp("Error executing commands 'gradle'. Make sure you have Gradle installed and its bin directory added to your PATH.");
394394
}
395395

396396
this.$androidToolsInfo.validateInfo({showWarningsAsErrors: true, validateTargetSdk: true}).wait();

0 commit comments

Comments
 (0)