[Console] Fixed SymfonyStyle when get terminal width fails
This commit is contained in:
parent
90a7fa0ca1
commit
a52b658932
@ -316,8 +316,8 @@ class SymfonyStyle extends OutputStyle
|
||||
private function getTerminalWidth()
|
||||
{
|
||||
$application = new Application();
|
||||
list ($width, $height) = $application->getTerminalDimensions();
|
||||
$dimensions = $application->getTerminalDimensions();
|
||||
|
||||
return $width;
|
||||
return $dimensions[0] ?: self::MAX_LINE_LENGTH;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user