diff --git a/src/Console/Terminal.php b/src/Console/Terminal.php index 8b585bf3..1e438135 100644 --- a/src/Console/Terminal.php +++ b/src/Console/Terminal.php @@ -54,7 +54,7 @@ private static function initDimensions(): void { $consoleMode = self::getConsoleMode(); - if ('\\' === \DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR && is_string(\getenv('ANSICON'))) { if (\preg_match('#^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$#', \trim(\getenv('ANSICON')), $matches)) { self::$width = (int) $matches[1]; } elseif (! self::hasVt100Support() && self::hasSttyAvailable()) {