-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
execSync redirects stderr to stdout:
sh = require('execSync');
var stdout = sh.exec('echo my_error >&2').stdout;
console.log('stdout: ' + stdout); // stdout: my_error
However, it would be preferable (IMO) if it worked like this instead:
var sh = require('execSync');
var stdout = sh.exec('echo my_output').stdout;
var stderr = sh.exec('echo my_error >&2').stderr;
console.log('stdout: ' + stdout + ' ; stderr: ' + stderr); // stdout: my_output ; stderr: my_error
Metadata
Metadata
Assignees
Labels
No labels