Skip to content

Commit

Permalink
chore: validates multiple arguments for vue create command (#3195)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 authored and haoqunjiang committed Jan 30, 2019
1 parent 0a0a65f commit 10c253a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@vue/cli/bin/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 10c253a

Please sign in to comment.