From f8b094864363f211f9b717f52a33881beb30b78f Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 16 Apr 2019 10:32:44 +0530 Subject: [PATCH 1/3] fix(cli-message): Shows an appropriate message with the --path option Shows up an appropriate message while trying to run app in non-project directory --- lib/commands/run.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/commands/run.ts b/lib/commands/run.ts index 5e34cfe578..80685ed576 100644 --- a/lib/commands/run.ts +++ b/lib/commands/run.ts @@ -66,7 +66,7 @@ export class RunIosCommand implements ICommand { private $errors: IErrors, private $injector: IInjector, private $platformService: IPlatformService, - private $projectData: IProjectData, + private $projectDataService: IProjectDataService, private $options: IOptions) { } @@ -75,11 +75,11 @@ export class RunIosCommand implements ICommand { } public async canExecute(args: string[]): Promise { - if (!this.$platformService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, this.$projectData)) { + if (!this.$platformService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, projectData)) { this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`); } - const result = await this.runCommand.canExecute(args) && await this.$platformService.validateOptions(this.$options.provision, this.$options.teamId, this.$projectData, this.$platformsData.availablePlatforms.iOS); + const result = await this.runCommand.canExecute(args) && await this.$platformService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.$platformsData.availablePlatforms.iOS); return result; } } From 852529636f805cbf78eefba14e26f75a6685b4d2 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 16 Apr 2019 11:01:15 +0530 Subject: [PATCH 2/3] Minor fix :construction: --- lib/commands/run.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/commands/run.ts b/lib/commands/run.ts index 80685ed576..32b20fb0f6 100644 --- a/lib/commands/run.ts +++ b/lib/commands/run.ts @@ -75,6 +75,8 @@ export class RunIosCommand implements ICommand { } public async canExecute(args: string[]): Promise { + const projectData = this.$projectDataService.getProjectData(); + if (!this.$platformService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, projectData)) { this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`); } From 1f5f160428049f1d2a395c64f56067e028008d41 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 16 Apr 2019 11:07:38 +0530 Subject: [PATCH 3/3] Fix linting error :construction: --- lib/commands/run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/run.ts b/lib/commands/run.ts index 32b20fb0f6..2e87e58376 100644 --- a/lib/commands/run.ts +++ b/lib/commands/run.ts @@ -76,7 +76,7 @@ export class RunIosCommand implements ICommand { public async canExecute(args: string[]): Promise { const projectData = this.$projectDataService.getProjectData(); - + if (!this.$platformService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, projectData)) { this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`); }