Skip to content

Commit e5fdc46

Browse files
committed
[Console] Fixed SymfonyStyle when get terminal width fails
1 parent 90a7fa0 commit e5fdc46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Console/Style/SymfonyStyle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ private function getProgressBar()
316316
private function getTerminalWidth()
317317
{
318318
$application = new Application();
319-
list ($width, $height) = $application->getTerminalDimensions();
319+
list($width, $height) = $application->getTerminalDimensions();
320320

321-
return $width;
321+
return $width ?: self::MAX_LINE_LENGTH;
322322
}
323323
}

0 commit comments

Comments
 (0)