10000 Silence isatty warnings during tty detection · symfony/symfony@3dc53a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dc53a4

Browse files
neclimdulnicolas-grekas
authored andcommitted
Silence isatty warnings during tty detection
1 parent 256ce7f commit 3dc53a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,11 @@ private static function hasColorSupport()
396396
}
397397

398398
if (\function_exists('stream_isatty')) {
399-
return stream_isatty(\STDOUT);
399+
return @stream_isatty(\STDOUT);
400400
}
401401

402402
if (\function_exists('posix_isatty')) {
403-
return posix_isatty(\STDOUT);
403+
return @posix_isatty(\STDOUT);
404404
}
405405

406406
$stat = fstat(\STDOUT);

src/Symfony/Component/Console/Helper/QuestionHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,11 @@ private function isInteractiveInput($inputStream): bool
485485
}
486486

487487
if (\function_exists('stream_isatty')) {
488-
return self::$stdinIsInteractive = stream_isatty(fopen('php://stdin', 'r'));
488+
return self::$stdinIsInteractive = @stream_isatty(fopen('php://stdin', 'r'));
489489
}
490490

491491
if (\function_exists('posix_isatty')) {
492-
return self::$stdinIsInteractive = posix_isatty(fopen('php://stdin', 'r'));
492+
return self::$stdinIsInteractive = @posix_isatty(fopen('php://stdin', 'r'));
493493
}
494494

495495
if (!\function_exists('exec')) {

0 commit comments

Comments
 (0)
0