I start a new project using the examples in readme, and got this error:
And if I restart it, an empty elevate.exe will be created under my temp folder, so I have to delete it before repeat this error.
Test code:
var Sudoer = require('electron-sudo').default;
var sudoer = new Sudoer();
sudoer.spawn('echo', ['%PARAM%'], {env: {PARAM: 'VALUE'}}).then(function (cp) {
cp.on('close', () => {
console.log(cp.output.stdout.toString());
});
});
I start a new project using the examples in readme, and got this error: And if I restart it, an empty elevate.exe will be created under my temp folder, so I have to delete it before repeat this error.
Test code: