node-pandoc
node-pandoc copied to clipboard
How to detect if pandoc is installed
I get some uncaught errors like:
Uncaught Error: write EPIPE
Uncaught Error: spawn pandoc ENOENT
But it is impossible to catch inside the nodePandoc callback (or outside). I want to give a user some alert that pandoc is not installed.
Thanks.
Answer to self: use package https://www.npmjs.com/package/command-exists like this
if (commandExistsSync('pandoc')) { ... }
Good thinking. I should include this internally rather than leaving it for everyone else to do. I’ll get on it.