Skip to content

Commit 91ef936

Browse files
mmermerkayazkat
authored andcommitted
cmd-list: Fix nested aliases, restore alias 'sit': 'cit' (#20513)
PR-URL: npm/npm#20513 Credit: @mmermerkaya Reviewed-By: @zkat
1 parent 85b8616 commit 91ef936

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/config/cmd-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var affordances = {
4646
'rm': 'uninstall',
4747
'r': 'uninstall',
4848
'rum': 'run-script',
49-
'sit': 'install-ci-test',
49+
'sit': 'cit',
5050
'urn': 'run-script'
5151
}
5252

lib/npm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@
191191
}
192192
if (plumbing.indexOf(c) !== -1) return c
193193
var a = abbrevs[c]
194-
if (aliases[a]) a = aliases[a]
194+
while (aliases[a]) {
195+
a = aliases[a]
196+
}
195197
return a
196198
}
197199

0 commit comments

Comments
 (0)