Skip to content

Commit

Permalink
fix: update readSync to not provide seek / offset parameters (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
trgwii authored Dec 18, 2023
1 parent a192fd9 commit 12022d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shim-prompts/src/readlineSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function readlineSync() {
while (char !== "\r" && char !== "\n") {
line += char;
try {
const bytesRead = readSync(process.stdin.fd, buf, 0, 1, 0);
const bytesRead = readSync(process.stdin.fd, buf);
if (bytesRead === 0) {
return line;
}
Expand All @@ -20,7 +20,7 @@ export function readlineSync() {
char = String(buf);
}
if (char === "\r") {
readSync(process.stdin.fd, buf, 0, 1, 0);
readSync(process.stdin.fd, buf);
}
return line;
}

0 comments on commit 12022d3

Please sign in to comment.