-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem this feature would solve?
Passing a Readable (more generally a Readable) to the stdin of a node subprocess is useful, but it hits this TODO in bun:
bun/src/js/node/child_process.ts
Lines 1607 to 1616 in a5712b9
| if (isNodeStreamReadable(item)) { | |
| if (Object.hasOwn(item, "fd") && typeof item.fd === "number") return item.fd; | |
| if (item._handle && typeof item._handle.fd === "number") return item._handle.fd; | |
| throw new Error(`TODO: stream.Readable stdio @ ${index}`); | |
| } | |
| if (isNodeStreamWritable(item)) { | |
| if (Object.hasOwn(item, "fd") && typeof item.fd === "number") return item.fd; | |
| if (item._handle && typeof item._handle.fd === "number") return item._handle.fd; | |
| throw new Error(`TODO: stream.Writable stdio @ ${index}`); | |
| } |
It would be nice to be able to use this feature to write portable code.
What is the feature you are proposing to solve the problem?
Implement the TODO.
What alternatives have you considered?
Hack in some workarounds, I guess?
coderabbitai
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request