diff --git a/lib/commands/prepare.ts b/lib/commands/prepare.ts index 2185388f0b..4fbf79ad92 100644 --- a/lib/commands/prepare.ts +++ b/lib/commands/prepare.ts @@ -2,12 +2,15 @@ "use strict"; export class PrepareCommand implements ICommand { - constructor(private $platformService: IPlatformService, + constructor(private $errors: IErrors, + private $platformService: IPlatformService, private $platformCommandParameter: ICommandParameter) { } execute(args: string[]): IFuture { return (() => { - this.$platformService.preparePlatform(args[0]); + if (!this.$platformService.preparePlatform(args[0]).wait()) { + this.$errors.failWithoutHelp("Unable to prepare the project."); + } }).future()(); } diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 2f568743d7..5cc1698b69 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -187,7 +187,7 @@ export class PlatformService implements IPlatformService { parser.parseFromString(fileContents, "text/xml"); xmlHasErrors = xmlHasErrors || hasErrors; if (xmlHasErrors) { - this.$logger.out("Error: ".red.bold + `${file} has syntax errors.`); + this.$logger.out("Error: ".red.bold + file + " has syntax errors.".red.bold); } }); return !xmlHasErrors;