Use child_process.execFile to prevent unescaped stuff (#2206)

Fix #2173
This commit is contained in:
Donghao Ren 2017-09-15 07:44:28 -07:00 committed by CHaBou
parent 79472c537a
commit 53a5a425f7

View file

@ -15,12 +15,11 @@ module.exports = {
const cmd = [process.execPath, yarn].concat(args).join(' ');
console.log('Launching yarn:', cmd);
cp.exec(cmd, {
cp.execFile(process.execPath, [yarn].concat(args), {
cwd: plugs.base,
env,
shell: true,
timeout: ms('5m'),
stdio: ['ignore', 'ignore', 'inherit']
maxBuffer: 1024 * 1024
}, err => {
if (err) {
cb(err);