scripted-editor/scripted — pull request #230 by scothis (2013-02-24 22:43:58+00:00)
Title: Allow exec 'env' to inherit from 'process.env'

When executing a command Node uses `process.env` by default. If the 'env'
option is specified, Node assumes that the complete environment is
provided.

As Scripted exec configurations are declarative, and it's practically
impossible to correctly configure an environment declaratively, Scripted
should mix the declared env vars into the 'process.env'.

For example, this is my .scripted config:
"exec": {
"onKeys": {
"cmd+b": {
"cmd": "npm test",
"cwd": "${projectDir}",
"name": "Test Project",
"env": {
"BUSTER_TEST_OPT": "--color none --reporter specification"
}
}
}
}

Before this patch, Node is unable to spawn the child process because the
environment is incomplete. After this patch, it's able to run the command
with 'process.env' as the environment, augmented with 'BUSTER_TEST_OPT'.