From dec4ff2e431b71a35b662f876a870468b751a17e Mon Sep 17 00:00:00 2001 From: RostiMelk Date: Wed, 11 Dec 2024 16:55:25 +0100 Subject: [PATCH] feat: one more help command prefix --- .../@sanity/cli/src/util/generateCommandsDocumentation.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/@sanity/cli/src/util/generateCommandsDocumentation.ts b/packages/@sanity/cli/src/util/generateCommandsDocumentation.ts index 00f9ba5e445..cd85d59066d 100644 --- a/packages/@sanity/cli/src/util/generateCommandsDocumentation.ts +++ b/packages/@sanity/cli/src/util/generateCommandsDocumentation.ts @@ -27,7 +27,10 @@ export function generateCommandsDocumentation( 'Commands:', ] .concat(commands.map((cmd) => ` ${padEnd(cmd.name, cmdLength + 1)} ${cmd.description}`)) - .concat(['', `See 'sanity help${prefix} ' for specific information on a subcommand.`]) + .concat([ + '', + `See 'npx sanity help${prefix} ' for specific information on a subcommand.`, + ]) return rows.join('\n') } @@ -43,7 +46,7 @@ export function generateCommandDocumentation( if (!command) { throw new Error( subCommand - ? `"${subCommand}" is not a subcommand of "${group}". See 'sanity help ${group}'` + ? `"${subCommand}" is not a subcommand of "${group}". See 'npx sanity help ${group}'` : getNoSuchCommandText(group || command), ) }