From a7c56036912adf665627f95da8c2cf90b07116fb Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Mon, 27 May 2024 15:37:04 -0400 Subject: [PATCH] feat(core): clean up show project --json false (#23486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Current Behavior Screenshot 2024-05-27 at 1 54 08 PM ## Expected Behavior ## Related Issue(s) Fixes # --- packages/nx/src/command-line/show/project.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/nx/src/command-line/show/project.ts b/packages/nx/src/command-line/show/project.ts index 048ead0bd7fcd..c7286a3640d22 100644 --- a/packages/nx/src/command-line/show/project.ts +++ b/packages/nx/src/command-line/show/project.ts @@ -47,10 +47,17 @@ export async function showProjectHandler( if (targets.length > 0) { console.log(`${chalk.bold('Targets')}: `); for (const [target, targetConfig] of targets) { + const executorCommandText = + targetConfig.metadata?.scriptContent ?? + targetConfig?.options?.command ?? + (targetConfig?.options?.commands?.length === 1 + ? targetConfig.options.commands[0] + : targetConfig?.executor) ?? + ''; console.log( - `- ${chalk.bold((target + ':').padEnd(maxTargetNameLength + 2))} ${( - targetConfig?.executor ?? '' - ).padEnd(maxExecutorNameLength + 2)} ${(() => { + `- ${chalk.bold( + (target + ':').padEnd(maxTargetNameLength + 2) + )} ${executorCommandText.padEnd(maxExecutorNameLength + 2)} ${(() => { const configurations = Object.keys( targetConfig.configurations ?? {} );