/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/node/tty_stream_fd/main.mjs
12 строк
571 B
Bartek Iwańczuk
fix(ext/node): set fd property on TTY ReadStream and WriteStream (#32880)
23 мар 2026, 10:35
Не верифицирован
23 мар 2026, 10:35
1df0225
Код
Авторство
О чём код?
import process from "node:process"; import fs from "node:fs"; // process.stdout.fd and process.stderr.fd should always be set, // regardless of whether the stream is a TTY or not. // This is needed by libraries like @google/gemini-cli that use // fs.writeSync(process.stdout.fd, data) for terminal capability detection. console.log("stdout.fd:", typeof process.stdout.fd, process.stdout.fd); console.log("stderr.fd:", typeof process.stderr.fd, process.stderr.fd); // fs.writeSync with process.stdout.fd should work fs.writeSync(process.stdout.fd, "writeSync works\n");