storebound 0.8.3: prompts read stdin with rt.readLine (node:readline) instead of Bun-only for await (const line of console), which crashed npx storebound desktop on Node/Windows; node-compat test bans Bun-only stdin iteration; Node prompt smoke, also on the Windows release runner
This commit is contained in:
parent
c3fed8efa2
commit
3a27c78f49
8 changed files with 111 additions and 9 deletions
|
|
@ -128,8 +128,8 @@ function canWrite(dir: string): boolean {
|
|||
|
||||
async function askYes(text: string): Promise<boolean> {
|
||||
process.stdout.write(text);
|
||||
for await (const line of console) return !/^n(o)?$/i.test(line.trim());
|
||||
return false;
|
||||
const line = await rt.readLine();
|
||||
return line !== null && !/^n(o)?$/i.test(line.trim());
|
||||
}
|
||||
|
||||
const tilde = (p: string) => (p.startsWith(homedir()) ? '~' + p.slice(homedir().length) : p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue