Skip to content

Commit bc2940b

Browse files
committed
fix: only output suggestions for subcommands
1 parent e4b1c52 commit bc2940b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/entrypoints/_shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export async function runCLI(entrypoint: string) {
237237
chalk.gray(`Nonexistent ${nonexistentType}: ${chalk.whiteBright(nonexistentRepresentation)}`),
238238
];
239239

240-
if (closestMatches.length) {
240+
if (closestMatches.length && nonexistentType === 'subcommand') {
241241
messageParts.push(
242242
chalk.gray(
243243
` Did you mean: ${closestMatches.map((cmd) => chalk.whiteBright(cmd)).join(', ')}?`,

0 commit comments

Comments
 (0)