- Version: v10.6.0
- Platform: Windows 10 64-bit
- Subsystem: child_process
Running the following results in a command prompt popping up to run the command, and the output not being piped correctly.
const log = fs.openSync('./log.out', 'w');
const c = cp.spawn(
'npm.cmd',
['-g', 'ls', '--depth', '0'],
{stdio: ['ignore', log, log], detached: true, shell: false, windowsHide: true}
);
Removing detached makes everything work just fine. But the command wont run if the parent dies, which is something I don't want in the actual scenario.
Running the following results in a command prompt popping up to run the command, and the output not being piped correctly.
Removing detached makes everything work just fine. But the command wont run if the parent dies, which is something I don't want in the actual scenario.