Terminal: explicitly assume that fopen(stdin) will not fail

This commit is contained in:
Dylan K. Taylor 2020-04-15 11:12:03 +01:00
parent 5c9419b55c
commit 2622c34542

View File

@ -90,6 +90,7 @@ abstract class Terminal{
private static function detectFormattingCodesSupport() : bool{
$stdout = fopen("php://stdout", "w");
if($stdout === false) throw new AssumptionFailedError("Opening php://stdout should never fail");
$result = (
stream_isatty($stdout) and //STDOUT isn't being piped
(