I'm trying to get the following code which should execute shell command to wor in OSX and Windows.
const exec = require("child_process").exec;
const runCommand = (cmd) => exec(cmd,
function (error, stdout, stderr) {
if (stdout.length > 0) {
console.log(stdout);
}
});
For the following runCommand("./node_modules/.bin/someBinary")
it does not work in Windows. But it works fine in OSX. So I wonder what modifications do I need for it to run in Windows as well?