Skip to content

Commit f9762dd

Browse files
authored
Fixes "Undefined constant STDOUT" error
Similar fix to Symfony's code.
1 parent 481c31b commit f9762dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Cli.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ public static function isSupportColor(): bool
146146
return true;
147147
}
148148

149+
// fix for "Undefined constant STDOUT" error
150+
if (!\defined('STDOUT')) {
151+
return false;
152+
}
153+
149154
$stream = STDOUT;
150155
if (\DIRECTORY_SEPARATOR === '\\') {
151156
return (\function_exists('sapi_windows_vt100_support')

0 commit comments

Comments
 (0)