From ea3d7688e4d10aa2b833daf0211acc31c7b1013f Mon Sep 17 00:00:00 2001 From: ogizanagi Date: Sun, 24 May 2015 19:13:03 +0200 Subject: [PATCH] [Console] SymfonyStyle : Fix blocks output is broken on windows cmd --- src/Symfony/Component/Console/Style/SymfonyStyle.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php index 74f9900ac4..6feea38ec8 100644 --- a/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -46,8 +46,9 @@ class SymfonyStyle extends OutputStyle public function __construct(InputInterface $input, OutputInterface $output) { $this->input = $input; - $this->lineLength = min($this->getTerminalWidth(), self::MAX_LINE_LENGTH); $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); }