mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-02 10:00:47 -05:00
chore: validates multiple arguments for vue create command (#3195)
This commit is contained in:
committed by
Haoqun Jiang
parent
0a0a65f812
commit
10c253a2d8
@@ -65,6 +65,10 @@ program
|
||||
.option('-b, --bare', 'Scaffold project without beginner instructions')
|
||||
.action((name, cmd) => {
|
||||
const options = cleanArgs(cmd)
|
||||
|
||||
if (minimist(process.argv.slice(3))._.length > 1) {
|
||||
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.'))
|
||||
}
|
||||
// --git makes commander to default git to true
|
||||
if (process.argv.includes('-g') || process.argv.includes('--git')) {
|
||||
options.forceGit = true
|
||||
|
||||
Reference in New Issue
Block a user