[Console] SymfonyStyle : Fix blocks output is broken on windows cmd
This commit is contained in:
parent
c62069bc52
commit
ea3d7688e4
@ -46,8 +46,9 @@ class SymfonyStyle extends OutputStyle
|
|||||||
public function __construct(InputInterface $input, OutputInterface $output)
|
public function __construct(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$this->input = $input;
|
$this->input = $input;
|
||||||
$this->lineLength = min($this->getTerminalWidth(), self::MAX_LINE_LENGTH);
|
|
||||||
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
|
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
|
||||||
|
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
|
||||||
|
$this->lineLength = min($this->getTerminalWidth() - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
|
||||||
|
|
||||||
parent::__construct($output);
|
parent::__construct($output);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user