Skip to content

Commit b1f3a4c

Browse files
committed
fix(cli-service): treat specific flags as boolean only
close vuejs#2258
1 parent 403727e commit b1f3a4c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ const Service = require('../lib/Service')
1616
const service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd())
1717

1818
const rawArgv = process.argv.slice(2)
19-
const args = require('minimist')(rawArgv)
19+
const args = require('minimist')(rawArgv, {
20+
boolean: [
21+
// build
22+
'modern',
23+
'report',
24+
'report-json',
25+
'watch',
26+
// serve
27+
'open',
28+
'copy',
29+
'https',
30+
// inspect
31+
'verbose'
32+
]
33+
})
2034
const command = args._[0]
2135

2236
service.run(command, args, rawArgv).catch(err => {

0 commit comments

Comments
 (0)