fix(--list-commands): fix --json flag

This commit is contained in:
Julien Fontanet 2016-10-24 15:55:22 +02:00
parent fbbd9ae249
commit 207aef7cb3

View File

@ -213,11 +213,11 @@ function listCommands (args) {
var json = false
var patterns = []
forEach(args, function (arg) {
if (arg === -'--json') {
if (arg === '--json') {
json = true
} else {
patterns.push(arg)
}
patterns.push(arg)
})
if (patterns.length) {