diff --git a/packages/generators/src/addon-generator.ts b/packages/generators/src/addon-generator.ts index 7206853e592..4cadf6fecc9 100644 --- a/packages/generators/src/addon-generator.ts +++ b/packages/generators/src/addon-generator.ts @@ -1,3 +1,4 @@ +import { yellow } from 'colorette'; import fs from 'fs'; import path from 'path'; import Generator from 'yeoman-generator'; @@ -57,7 +58,7 @@ const addonGenerator = ( public async prompting(): Promise { if (!this.supportedTemplates.includes(this.template)) { - this.utils.logger.warn(`⚠ ${this.template} is not a valid template, please select one from below`); + this.utils.logger.log(`${yellow(`⚠ ${this.template} is not a valid template, please select one from below`)}`); const { selectedTemplate } = await List( this, diff --git a/test/loader/loader.test.js b/test/loader/loader.test.js index 707ae7a7f8d..59dd3f4554e 100644 --- a/test/loader/loader.test.js +++ b/test/loader/loader.test.js @@ -147,8 +147,8 @@ describe('loader command', () => { it('should prompt on supplying an invalid template', async () => { const assetsPath = await uniqueDirectoryForTest(); - const { stderr } = await runPromptWithAnswers(assetsPath, ['loader', '--template=unknown']); + const { stdout } = await runPromptWithAnswers(assetsPath, ['loader', '--template=unknown']); - expect(stderr).toContain('unknown is not a valid template'); + expect(stdout).toContain('unknown is not a valid template'); }); }); diff --git a/test/plugin/plugin.test.js b/test/plugin/plugin.test.js index 1ba9e02f150..2ae0709e010 100644 --- a/test/plugin/plugin.test.js +++ b/test/plugin/plugin.test.js @@ -136,8 +136,8 @@ describe('plugin command', () => { it('should prompt on supplying an invalid template', async () => { const assetsPath = await uniqueDirectoryForTest(); - const { stderr } = await runPromptWithAnswers(assetsPath, ['plugin', '--template=unknown']); + const { stdout } = await runPromptWithAnswers(assetsPath, ['plugin', '--template=unknown']); - expect(stderr).toContain('unknown is not a valid template'); + expect(stdout).toContain('unknown is not a valid template'); }); });