-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Closed
Copy link
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: v13.11.0
- Platform: Windows 10 64-bit
- Subsystem: stream
What steps will reproduce the bug?
index.mjs:
import { pipeline, PassThrough } from 'stream'
async function* asyncGen(source) {
for await (const chunk of source) {
yield chunk;
}
}
pipeline(process.stdin, asyncGen, process.stdout, err => {
console.error('end')
})then echo "hello" | node index.mjs ends up like this:
"hello"
end
but if you replace asyncGen in the pipeline by new PassThrough(), it ends up like this:
"hello"
As you can see, the callback is never called.
How often does it reproduce? Is there a required condition?
What is the expected behavior?
"hello"
end
What do you see instead?
"hello"
Additional information
I don't really know if it's an expected behavior or a bug to be honest. As I can't find anything related in the documentation, it feels like a bug.
Metadata
Metadata
Assignees
Labels
help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.