We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f84d20 commit f160badCopy full SHA for f160bad
packages/@vue/cli/bin/vue.js
@@ -257,10 +257,15 @@ if (!process.argv.slice(2).length) {
257
258
function suggestCommands (unknownCommand) {
259
const availableCommands = program.commands.map(cmd => cmd._name)
260
-
261
- const suggestion = availableCommands.find(cmd => {
262
- return leven(cmd, unknownCommand) < 3
+
+ let suggestion
263
+ availableCommands.forEach(cmd => {
264
+ if (leven(cmd, unknownCommand) < 3) {
265
+ suggestion = cmd
266
+ }
267
})
268
269
if (suggestion) {
270
console.log(` ` + chalk.red(`Did you mean ${chalk.yellow(suggestion)}?`))
271
}
0 commit comments