Skip to content

Commit

Permalink
fix(@angular/cli): Fixing duplicate aliases issue (#4987)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitarora authored and hansl committed Mar 2, 2017
1 parent 2699857 commit 0fc2190
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@angular/cli/ember-cli/lib/models/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ Command.prototype.mergeDuplicateOption = function(key) {
*/
Command.prototype.normalizeOption = function(option) {
option.key = camelize(option.name);
option.aliases = (option.aliases || []).concat(camelize(option.name));
option.aliases = (option.aliases || []);
if (option.aliases.indexOf(camelize(option.name)) === -1) {
option.aliases = option.aliases.concat(camelize(option.name));
}
option.required = option.required || false;
return option;
};
Expand Down

0 comments on commit 0fc2190

Please sign in to comment.