Skip to content

Commit 10c253a

Browse files
jamesgeorge007haoqunjiang
authored andcommitted
chore: validates multiple arguments for vue create command (#3195)
1 parent 0a0a65f commit 10c253a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@vue/cli/bin/vue.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ program
6565
.option('-b, --bare', 'Scaffold project without beginner instructions')
6666
.action((name, cmd) => {
6767
const options = cleanArgs(cmd)
68+
69+
if (minimist(process.argv.slice(3))._.length > 1) {
70+
console.log(chalk.yellow('\n Info: You provided more than one argument. The first one will be used as the app\'s name, the rest are ignored.'))
71+
}
6872
// --git makes commander to default git to true
6973
if (process.argv.includes('-g') || process.argv.includes('--git')) {
7074
options.forceGit = true

0 commit comments

Comments
 (0)