diff --git a/src/console/format.php b/src/console/format.php --- a/src/console/format.php +++ b/src/console/format.php @@ -187,8 +187,19 @@ if ($width === null) { if (phutil_is_windows()) { - // TODO: Figure out how to get this working in Windows. - return null; + + preg_match('/(\n[^|]+?){4}(\d+)/', `mode con`, $matches); + + if(is_array($matches)&&isset($matches[2])&&!empty($matches[2])) { + + return (int)$matches[2]; + + }else { + + return null; + + } + } $tmp = new TempFile();