chore: validates multiple arguments for vue create command (#3195)

This commit is contained in:
James George
2019-01-30 19:27:37 +05:30
committed by Haoqun Jiang
parent 0a0a65f812
commit 10c253a2d8
+4
View File
@@ -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