gulp-run
gulp-run copied to clipboard
gulp-run modifies global process.env polluting PATH
On this line in command.js this.options.env
is assigned process.env
. Immediately afterwards this.options.env.PATH
is modified. As process.env
wasn't defensively copied when it was assigned this modifies the global process.env.PATH
. So if you check process.env.PATH
at the end of a gulp run it'll be full of other crap. And because of where this happens this problem applies just by defining your tasks, they don't even need to be run.
When defaulting options.env
it should shallow copy process.env
.