diff --git a/lib/svgo/coa.js b/lib/svgo/coa.js index d706ad6a5..026e7fa73 100644 --- a/lib/svgo/coa.js +++ b/lib/svgo/coa.js @@ -28,7 +28,10 @@ module.exports = require('coa').Cmd() .only() .flag() .act(function() { - return PKG.version; + // output the version to stdout instead of stderr if returned + process.stdout.write(PKG.version + '\n'); + // coa will run `.toString` on the returned value and send it to stderr + return ''; }) .end() .opt()