Page MenuHomePhabricator

D14203.diff
No OneTemporary

D14203.diff

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();

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 19, 3:09 PM (3 d, 16 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9624761
Default Alt Text
D14203.diff (559 B)

Event Timeline