What version of Bun is running?
1.1.42+50eec0025
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
using console as an async iterator only works "the first time", this is a regression of #5175
export async function waitForUserInput(prompt) {
console.log(prompt);
for await (const line of console) {
console.log(`pong ${line}`);
if (line.trim() === 'exit') {
return;
}
}
}
await waitForUserInput('first');
await waitForUserInput('second');
What is the expected behavior?
i would expect to also have the echo work for the second call of waitForUserInput
What do you see instead?
second is printed to console (function is called) but pressing enter has no effect upon entering anything in the terminal
Additional information
i suspect that this is windows-specific, since i know that in the past this has worked for me on mac before
but it might also be a regression in a recent version of bun
What version of Bun is running?
1.1.42+50eec0025
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
using console as an async iterator only works "the first time", this is a regression of #5175
What is the expected behavior?
i would expect to also have the echo work for the second call of
waitForUserInputWhat do you see instead?
secondis printed to console (function is called) but pressing enter has no effect upon entering anything in the terminalAdditional information
i suspect that this is windows-specific, since i know that in the past this has worked for me on mac before
but it might also be a regression in a recent version of bun