Skip to content

Commit

Permalink
add deno check
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Sep 28, 2024
1 parent 908bd9a commit 0863061
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prompt/_generic_prompt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Cursor } from "@cliffy/ansi/cursor-position";
import { type Tty, tty } from "@cliffy/ansi/tty";
import { getRuntimeName } from "@cliffy/internal/runtime/runtime-name";
import { type KeyCode, parse } from "@cliffy/keycode";
import {
bold,
Expand Down Expand Up @@ -363,7 +364,7 @@ export abstract class GenericPrompt<

/** Read user input from stdin. */
#readChar = async (): Promise<Uint8Array> => {
const buffer = new Uint8Array(4096);
const buffer = new Uint8Array(getRuntimeName() === "deno" ? 8 : 4096);
const isTty = this.settings.reader.isTerminal();

if (isTty) {
Expand Down

0 comments on commit 0863061

Please sign in to comment.