Skip to content

Commit ba30cc1

Browse files
sumitarorahansl
authored andcommitted
fix(@angular/cli): fixing the help command aliases (angular#4880)
1 parent 8cec3ce commit ba30cc1

File tree

1 file changed

+7
-1
lines changed
  • packages/@angular/cli/commands

1 file changed

+7
-1
lines changed

packages/@angular/cli/commands/help.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ const HelpCommand = Command.extend({
5555
});
5656

5757
if (rawArgs.length > 0) {
58-
if (cmd === rawArgs[0]) {
58+
let commandInput = rawArgs[0];
59+
const aliases = Command.prototype.aliases;
60+
if (aliases && aliases.indexOf(commandInput) > -1) {
61+
commandInput = Command.prototype.name;
62+
}
63+
64+
if (cmd === commandInput) {
5965
if (command.printDetailedHelp(commandOptions)) {
6066
this.ui.writeLine(command.printDetailedHelp(commandOptions));
6167
} else {

0 commit comments

Comments
 (0)