Skip to content

Commit 139e665

Browse files
escapedcatmarionebl
authored andcommitted
feat(cli): add verbose option #606
1 parent f7e4e68 commit 139e665

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: @commitlint/cli/src/cli.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ const flags = {
7979
description: 'toggle console output',
8080
type: 'boolean'
8181
},
82+
verbose: {
83+
alias: 'vb',
84+
default: false,
85+
description: 'show console output even on success',
86+
type: 'boolean'
87+
},
8288
to: {
8389
alias: 't',
8490
default: null,
@@ -207,7 +213,9 @@ async function main(options) {
207213
const output = format(report, {color: flags.color});
208214

209215
if (!flags.quiet) {
210-
console.log(output);
216+
if (!report.valid || report.warningCount > 0 || flags.verbose) {
217+
console.log(output);
218+
}
211219
}
212220

213221
if (!report.valid) {

0 commit comments

Comments
 (0)