Skip to content

Commit 000afd2

Browse files
committed
Merge pull request #893 from NativeScript/totev/fail-without-help-gradle-release
Make gradle error more user friendly
2 parents 68537d8 + 625f2fd commit 000afd2

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
@@ -84,7 +84,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
8484
public createProject(frameworkDir: string, frameworkVersion: string): IFuture<void> {
8585
return (() => {
8686
if(semver.lt(frameworkVersion, AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE)) {
87-
this.$errors.fail(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
87+
this.$errors.failWithoutHelp(`The NativeScript CLI requires Android runtime ${AndroidProjectService.MIN_RUNTIME_VERSION_WITH_GRADLE} or later to work properly.`);
8888
}
8989

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

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

0 commit comments

Comments
 (0)