Skip to content

Commit

Permalink
feat(cli): add verbose option #606
Browse files Browse the repository at this point in the history
  • Loading branch information
escapedcat committed Apr 4, 2019
1 parent 5b9ce68 commit 85c6e70
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion @commitlint/cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ const flags = {
description: 'toggle console output',
type: 'boolean'
},
verbose: {
alias: 'vb',
default: false,
description: 'show console output even on success',
type: 'boolean'
},
to: {
alias: 't',
default: null,
Expand Down Expand Up @@ -198,7 +204,9 @@ async function main(options) {
const output = format(report, {color: flags.color});

if (!flags.quiet) {
console.log(output);
if (!report.valid || report.warningCount > 0 || flags.verbose) {
console.log(output);
}
}

if (!report.valid) {
Expand Down

0 comments on commit 85c6e70

Please sign in to comment.