mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 21:24:48 +00:00
fix(node): support passing parent stdio streams (#19171)
This is a bit bare bones but gets `npm-run-all` working. For full stdio compatibility with node more work is needed which is probably better done in follow up PRs. Fixes #19159
This commit is contained in:
parent
9dc3ae8523
commit
695b5de6cb
3 changed files with 77 additions and 10 deletions
15
cli/tests/unit_node/testdata/child_process_stdio.js
vendored
Normal file
15
cli/tests/unit_node/testdata/child_process_stdio.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
import childProcess from "node:child_process";
|
||||
import process from "node:process";
|
||||
import * as path from "node:path";
|
||||
|
||||
const script = path.join(
|
||||
path.dirname(path.fromFileUrl(import.meta.url)),
|
||||
"node_modules",
|
||||
"foo",
|
||||
"index.js",
|
||||
);
|
||||
|
||||
const child = childProcess.spawn(process.execPath, [script], {
|
||||
stdio: [process.stdin, process.stdout, process.stderr],
|
||||
});
|
||||
child.on("close", () => console.log("close"));
|
Loading…
Add table
Add a link
Reference in a new issue