-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(node): support child stdio streams
- Loading branch information
1 parent
99c3028
commit c2fbb0f
Showing
3 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import child_process 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 = child_process.spawn(process.execPath, [script], { | ||
stdio: [process.stdin, process.stdout, process.stderr], | ||
}); | ||
child.on("close", () => console.log("close")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters