-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.
Description
- Version: v4.8.0 and up
- Platform: Linux 4.4.0-64-generic Update README.md #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: child_process
Arguments array to spawn behaves differently between node versions up to 4.7.3 and node 4.8.0+
PoC - works as expected only in old versions. Nev node will pass 'install --production' as arguments to bash
const childProcess = require('child_process');
const spawn = childProcess.spawn;
const defaultOptions = {
env: {},
shell: "/bin/bash",
stdio: [0, 1, 2]
};
const p = childProcess.spawn("/bin/bash", [ '-c', 'npm install --production' ], defaultOptions)
p.on('exit', exitCode => {
console.log(exitCode);
});
The PoC is a short version of spawn-shell parro-it/spawn-shell#1
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.