Browse Source

Add more comments in ConsoleIO, closes #5836

Jordi Boggiano 8 years ago
parent
commit
f3af3da16f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Composer/IO/ConsoleIO.php

+ 3 - 0
src/Composer/IO/ConsoleIO.php

@@ -206,6 +206,9 @@ class ConsoleIO extends BaseIO
         // write the new message
         $this->doWrite($messages, false, $stderr, $verbosity);
 
+        // In cmd.exe on Win8.1 (possibly 10?), the line can not be cleared, so we need to
+        // track the length of previous output and fill it with spaces to make sure the line is cleared.
+        // See https://github.com/composer/composer/pull/5836 for more details
         $fill = $size - strlen(strip_tags($messages));
         if ($fill > 0) {
             // whitespace whatever has left