var shell = require('shelljs');
var child = shell.exec('node --version', {silent:true, async:true});
child.stdout.on('data', function(data) {
console.log(data);
});
child.on("exit", function(code) {
console.log(code);
});
child.on("error", function (error) {
console.log(error);
});
The output of this command is :
What do i have to do, to make shelljs return all data immediately and before on exit is executed ?
The output of this command is :
What do i have to do, to make shelljs return all data immediately and before on exit is executed ?