MCPcopy Index your code
hub / github.com/angular/angular-cli / isTTY

Function isTTY

packages/angular_devkit/schematics_cli/bin/schematics.ts:555–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553}
554
555function isTTY(): boolean {
556 const isTruthy = (value: undefined | string) => {
557 // Returns true if value is a string that is anything but 0 or false.
558 return value !== undefined && value !== '0' && value.toUpperCase() !== 'FALSE';
559 };
560
561 // If we force TTY, we always return true.
562 const force = process.env['NG_FORCE_TTY'];
563 if (force !== undefined) {
564 return isTruthy(force);
565 }
566
567 return !!process.stdout.isTTY && !isTruthy(process.env['CI']);
568}
569
570if (require.main === module) {
571 const args = process.argv.slice(2);

Callers 1

mainFunction · 0.70

Calls 1

isTruthyFunction · 0.85

Tested by

no test coverage detected