someProcess.stderr.pipeTo(
new WritableStream({
write(chunk, controller) {
if (someCondition()) {
// how the heck do i "undo" this sink?
// i want to stop processing here, and i don't care what
// happens to stderr after this point.
}
},
}),
);
someProcess.stderr.pipeTo(
new WritableStream({
write(chunk, controller) {
if (someCondition()) {
// how the heck do i "undo" this sink?
// i want to stop processing here, and i don't care what
// happens to stderr after this point.
}
},
}),
);