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 authored and marionebl committed Apr 26, 2019
1 parent f7e4e68 commit 139e665
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 @@ -207,7 +213,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 139e665

Please sign in to comment.