Skip to content

Commit

Permalink
Fixes #464 by outputting the version to stdout instead of letting coa…
Browse files Browse the repository at this point in the history
… send it to stderr
  • Loading branch information
yandavid committed Dec 28, 2015
1 parent 573d865 commit 3f6cddb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/svgo/coa.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3f6cddb

Please sign in to comment.