diff --git a/node-src/ui/messages/errors/buildFailed.stories.ts b/node-src/ui/messages/errors/buildFailed.stories.ts index 72eb28e6e..c37747b74 100644 --- a/node-src/ui/messages/errors/buildFailed.stories.ts +++ b/node-src/ui/messages/errors/buildFailed.stories.ts @@ -59,3 +59,15 @@ export const BuildFailed = () => { message: 'Command failed with exit code 1' }, buildLog ); + +export const BuildFailedWithCommand = () => + buildFailed( + { + options: { buildCommand: 'nx run my-app:build-storybook' }, + buildCommand, + buildLogFile: '/path/to/project/build-storybook.log', + runtimeMetadata, + } as any, + { message: 'Command failed with exit code 1' }, + buildLog + ); diff --git a/node-src/ui/messages/errors/buildFailed.ts b/node-src/ui/messages/errors/buildFailed.ts index aa48c1b9a..300736b46 100644 --- a/node-src/ui/messages/errors/buildFailed.ts +++ b/node-src/ui/messages/errors/buildFailed.ts @@ -16,8 +16,8 @@ export default ( const commandToBuild = buildScriptName || buildCommandOption; const suggestedRunCommands = buildScriptName - ? `{bold npm run ${commandToBuild}} or {bold yarn ${commandToBuild}}` - : `{bold ${commandToBuild}}`; + ? chalk`{bold npm run ${commandToBuild}} or {bold yarn ${commandToBuild}}` + : chalk`{bold ${commandToBuild}}`; return [ dedent(chalk`