Skip to content

Commit d1d5ac7

Browse files
clydinalexeagle
authored andcommitted
fix(@angular/cli): use recommended TTY check logic
`stdin` can be redirected/piped by various shells but still be interactive. Node.js recommends only testing `stdout`: https://nodejs.org/api/tty.html#tty_tty Fixes #14640
1 parent 55cdfdc commit d1d5ac7

File tree

1 file changed

+3
-1
lines changed
  • packages/angular/cli/utilities

1 file changed

+3
-1
lines changed

packages/angular/cli/utilities/tty.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ export function isTTY(): boolean {
1111
return !(force === '0' || force.toUpperCase() === 'FALSE');
1212
}
1313

14-
return !!process.stdout.isTTY && !!process.stdin.isTTY && !('CI' in process.env);
14+
const ci = process.env['CI'];
15+
16+
return !!process.stdout.isTTY && (!ci || ci === '0' || ci.toUpperCase() === 'FALSE');
1517
}

0 commit comments

Comments
 (0)