Skip to content

Commit 803a4c8

Browse files
committed
style(cli): avoid map spread when collecting child command names
1 parent ae834e9 commit 803a4c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/cli/program/commander-parse-facts.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ export function getCommanderErrorCommandNames(program: Command): string[] | unde
111111
? command
112112
.createHelp()
113113
.visibleCommands(command)
114-
.flatMap((child) => [child.name(), ...child.aliases()])
114+
.flatMap((child) => child.aliases().concat(child.name()))
115115
: undefined;
116116
}

0 commit comments

Comments
 (0)