-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] SymfonyStyle : fix blocks output is broken on windows cmd #14740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fabpot : Is it sufficient ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove the github reference, there is no need for that as the merge commit already contains everything we need to know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
parent::__construct($output); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That probably deserves a small comment to indicate why there is such a "hack" here.