node-pandoc icon indicating copy to clipboard operation
node-pandoc copied to clipboard

How to detect if pandoc is installed

Open po5i opened this issue 8 years ago • 2 comments

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.

po5i avatar Aug 09 '17 20:08 po5i

Answer to self: use package https://www.npmjs.com/package/command-exists like this

if (commandExistsSync('pandoc')) { ... }

po5i avatar Sep 22 '17 23:09 po5i

Good thinking. I should include this internally rather than leaving it for everyone else to do. I’ll get on it.

eshinn avatar Sep 23 '17 14:09 eshinn