Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea3d768

Browse filesBrowse files
committed
[Console] SymfonyStyle : Fix blocks output is broken on windows cmd
1 parent c62069b commit ea3d768
Copy full SHA for ea3d768

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Style/SymfonyStyle.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ class SymfonyStyle extends OutputStyle
4646
public function __construct(InputInterface $input, OutputInterface $output)
4747
{
4848
$this->input = $input;
49-
$this->lineLength = min($this->getTerminalWidth(), self::MAX_LINE_LENGTH);
5049
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
50+
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
51+
$this->lineLength = min($this->getTerminalWidth() - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
5152

5253
parent::__construct($output);
5354
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.