浏览代码

Add more comments in ConsoleIO, closes #5836

Jordi Boggiano 8 年之前
父节点
当前提交
f3af3da16f
共有 1 个文件被更改,包括 3 次插入0 次删除
  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