In node.js I want to pick a cwd and pass a string argument. I have this
const exec = cp.exec;
exec("logic_parser.exe", {cwd: '../logic_parser/logic_parser/bin/Debug/'}, ['read'], (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
});
But it complains about incorrect args.
via omega
No comments:
Post a Comment