Revert "Disable overwrites when no-ansi is present, fixes #3612"
This reverts commit e0d36e19eb
.
Conflicts:
src/Composer/IO/ConsoleIO.php
pull/3868/head
parent
17baee4e80
commit
66b73ea456
|
@ -163,15 +163,6 @@ class ConsoleIO extends BaseIO
|
|||
$output = $this->output;
|
||||
}
|
||||
|
||||
if (!$output->isDecorated()) {
|
||||
if (!$messages) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->doWrite($messages, count($messages) === 1 || $newline, $stderr);
|
||||
return;
|
||||
}
|
||||
|
||||
// messages can be an array, let's convert it to string anyway
|
||||
$messages = join($newline ? "\n" : '', (array) $messages);
|
||||
|
||||
|
|
|
@ -99,27 +99,21 @@ class ConsoleIOTest extends TestCase
|
|||
->method('write')
|
||||
->with($this->equalTo('something (<question>strlen = 23</question>)'));
|
||||
$outputMock->expects($this->at(1))
|
||||
->method('isDecorated')
|
||||
->willReturn(true);
|
||||
$outputMock->expects($this->at(2))
|
||||
->method('write')
|
||||
->with($this->equalTo(str_repeat("\x08", 23)), $this->equalTo(false));
|
||||
$outputMock->expects($this->at(3))
|
||||
$outputMock->expects($this->at(2))
|
||||
->method('write')
|
||||
->with($this->equalTo('shorter (<comment>12</comment>)'), $this->equalTo(false));
|
||||
$outputMock->expects($this->at(4))
|
||||
$outputMock->expects($this->at(3))
|
||||
->method('write')
|
||||
->with($this->equalTo(str_repeat(' ', 11)), $this->equalTo(false));
|
||||
$outputMock->expects($this->at(5))
|
||||
$outputMock->expects($this->at(4))
|
||||
->method('write')
|
||||
->with($this->equalTo(str_repeat("\x08", 11)), $this->equalTo(false));
|
||||
$outputMock->expects($this->at(6))
|
||||
->method('isDecorated')
|
||||
->willReturn(true);
|
||||
$outputMock->expects($this->at(7))
|
||||
$outputMock->expects($this->at(5))
|
||||
->method('write')
|
||||
->with($this->equalTo(str_repeat("\x08", 12)), $this->equalTo(false));
|
||||
$outputMock->expects($this->at(8))
|
||||
$outputMock->expects($this->at(6))
|
||||
->method('write')
|
||||
->with($this->equalTo('something longer than initial (<info>34</info>)'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue