diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-12-06 12:19:12 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-12-06 12:19:12 +0000 |
| commit | 995fe75d5780f31cb5dad281afa2e65eb4a2e5b9 (patch) | |
| tree | fd5c788ca521d14b64dfcb5351bb56f14e9cae8a | |
| parent | 0af17133676d9c07604a54783b4f6c720fcc46cb (diff) | |
Write result messages to stderr in CLI
| -rw-r--r-- | lib/main.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/main.js b/lib/main.js index 4e79747..b472d06 100644 --- a/lib/main.js +++ b/lib/main.js @@ -38,6 +38,11 @@ function main(argv) { return mammoth.convert({path: docxPath}, options) .then(function(result) { + result.messages.forEach(function(message) { + process.stderr.write(message.message); + process.stderr.write("\n"); + }); + var outputStream = outputPath ? fs.createWriteStream(outputPath) : process.stdout; outputStream.write(result.value); |
