Skip to content

Commit 53d52d1

Browse files
committed
Update Terminal.php
1 parent e09313c commit 53d52d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/Terminal.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ private static function initDimensions(): void
5454
{
5555
$consoleMode = self::getConsoleMode();
5656

57-
if ('\\' === \DIRECTORY_SEPARATOR && is_string(\getenv('ANSICON'))) {
58-
if (\preg_match('#^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$#', \trim(\getenv('ANSICON')), $matches)) {
57+
if ('\\' === \DIRECTORY_SEPARATOR) {
58+
if (is_string(\getenv('ANSICON')) && \preg_match('#^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$#', \trim(\getenv('ANSICON')), $matches)) {
5959
self::$width = (int) $matches[1];
6060
} elseif (! self::hasVt100Support() && self::hasSttyAvailable()) {
6161
self::initDimensionsUsingStty();

0 commit comments

Comments
 (0)