You have to pass an options object that includes the key env whose value is itself an object of key value pairs.
exec('echo $FOO', {env: {'FOO': 'ah'}}, function (error, stdout, stderr)
{
console.log(stdout, stderr, error);
});
You have to pass an options object that includes the key env whose value is itself an object of key value pairs.
exec('echo $FOO', {env: {'FOO': 'ah'}}, function (error, stdout, stderr)
{
console.log(stdout, stderr, error);
});