Skip to content

Commit

Permalink
fix(ext/node): use tty stdin from ext/io (#23044)
Browse files Browse the repository at this point in the history
Fixes #23043
  • Loading branch information
littledivy authored Mar 28, 2024
1 parent 9c6eca1 commit de0b230
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/node/polyfills/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { LibuvStreamWrap } from "ext:deno_node/internal_binding/stream_wrap.ts";
import { providerType } from "ext:deno_node/internal_binding/async_wrap.ts";
import { Socket } from "node:net";
import { setReadStream } from "ext:deno_node/_process/streams.mjs";
import * as io from "ext:deno_io/12_io.js";

// Returns true when the given numeric fd is associated with a TTY and false otherwise.
function isatty(fd) {
Expand Down Expand Up @@ -46,7 +47,7 @@ export class ReadStream extends Socket {
// We only support `stdin`.
if (fd != 0) throw new Error("Only fd 0 is supported.");

const tty = new TTY(Deno.stdin);
const tty = new TTY(io.stdin);
super({
readableHighWaterMark: 0,
handle: tty,
Expand Down

0 comments on commit de0b230

Please sign in to comment.