Skip to content

Commit

Permalink
Do not print statistics when using in stdout mode
Browse files Browse the repository at this point in the history
When using the `stdout` output mode (e.g. using `svgo -` within a
pipeline), the time and optimization statistics shouldn't be printed in
the output stream.
  • Loading branch information
corpulentcoffee authored and GreLI committed Nov 7, 2017
1 parent 3ec0767 commit 7797bba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/svgo/coa.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ function processSVGData(config, info, data, output, input) {
processingTime = Date.now() - startTime;

return writeOutput(input, output, result.data).then(function() {
if (!config.quiet) {
if (input && output != '-') {
if (!config.quiet && output != '-') {
if (input) {
console.log(`\n${PATH.basename(input)}:`);
}
printTimeInfo(processingTime);
Expand Down

0 comments on commit 7797bba

Please sign in to comment.