/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/cli/src/utilities/tty.ts
21 строка
733 B
Charles Lyding
refactor(@angular/cli): centralize environment variable parsing
04 авг 2025, 17:06
04 авг 2025, 17:06
b6b2578
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { forceTty, isCI } from './environment-options'; /** * Determines if the `stream` is a TTY. * * @param stream A NodeJS stream to check. Defaults to `process.stdout`. * @returns `true` if the `stream` is a TTY, `false` otherwise. This detection is overridden * by the `NG_FORCE_TTY` environment variable. In a CI environment, this will also be `false` * unless `NG_FORCE_TTY` is set. */ export function isTTY(stream: NodeJS.WriteStream = process.stdout): boolean { return forceTty ?? (!!stream.isTTY && !isCI); }