فهرست منبع

Substract 1char from the width to avoid blank lines in the output on windows

Jordi Boggiano 12 سال پیش
والد
کامیت
d4fb7bd251
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      src/Composer/Command/ShowCommand.php

+ 3 - 0
src/Composer/Command/ShowCommand.php

@@ -146,6 +146,9 @@ EOT
                     $versionLength = max($versionLength, strlen($this->versionParser->formatVersion($package)));
                 }
                 list($width) = $this->getApplication()->getTerminalDimensions();
+                if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+                    $width--;
+                }
 
                 $writeVersion = $showVersion && ($nameLength + $versionLength + 3 <= $width);
                 $writeDescription = $nameLength + ($showVersion ? $versionLength : 0) + 24 <= $width;