diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-28 08:55:05 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 04:25:05 +0100 |
commit | de0b230078daebbbec82ea5d7aabb9f0a429125f (patch) | |
tree | 6652a0d09567420a8832ba6c89ee36efacf5f889 /ext/node/polyfills/tty.js | |
parent | 9c6eca1064de029e560377bef831e69d22c5c00b (diff) |
fix(ext/node): use tty stdin from ext/io (#23044)
Fixes https://github.com/denoland/deno/issues/23043
Diffstat (limited to 'ext/node/polyfills/tty.js')
-rw-r--r-- | ext/node/polyfills/tty.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/tty.js b/ext/node/polyfills/tty.js index 5cbb55ecd..705644d7c 100644 --- a/ext/node/polyfills/tty.js +++ b/ext/node/polyfills/tty.js @@ -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) { @@ -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, |