Files
bun.sh/test/bun.js/spawned-child.js
Derrick Farris 7f5022db0c fix(child_process): fix execFileSync options.input (#1479)
* fix(child_process): fix execFileSync options.input

* fix(child_process): debug err, check for Uint8Array too

* fix(child_process): fix ArrayBufferIsView call

* test(child_process): fix missing toString() call on test result

* refactor(child_process): change options.input to input to getter calls
2022-11-09 18:10:29 -08:00

12 lines
244 B
JavaScript

if (process.argv[2] === "STDIN") {
let result = "";
process.stdin.on("data", (data) => {
result += data;
});
process.stdin.on("close", () => {
console.log(result);
});
} else {
setTimeout(() => console.log("hello"), 150);
}