-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
child_process normalizeSpawnArguments doesn't handle spaced arguments #31068
Comments
Can you provide a clearer statement of how to reproduce? Is there a Gulpfile or something that one needs to reproduce this problem? |
Sorry, wanted to show real world example. Here is the minimal one: child_process.zip
whereas I would expect rather |
Thanks! For people who don't want to download anything (or in case the link becomes stale at some point): a.js: const args = process.argv.slice(2);
args.forEach((arg, i) => console.log(`${i}) ${arg}`)); b.js: const { spawn } = require('child_process');
const a = spawn('node', [__dirname + '/a.js', 'Hello world'], {shell: true});
a.stdout.on('data', data => {
console.log(data.toString());
}); |
@nodejs/child_process |
Closing as a duplicate of #29532 |
v13.5.0
Windows 10 64
Reproduce:
npx gulp "full dev" =>
(normalizeSpawnArguments, args = ['full dev'] ) const command = [file].concat(args).join(' '); =>
"path/to/gulp.cmd full dev"
The text was updated successfully, but these errors were encountered: