feat(cli): support CR in multiline input

This commit is contained in:
Julien Oculi 2024-04-03 17:52:38 +02:00
parent 7fb5167308
commit 55a1ca7e9d

View file

@ -22,7 +22,7 @@ export async function promptProps<
for await (const chunk of Deno.stdin.readable) {
const text = decoder.decode(chunk)
if (text.startsWith('!EOF\n')) {
if ((/^!EOF\r?\n$/.test(text))) {
break
}
//@ts-ignore TODO fix type inference