]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Make 'arc' work for users without the POSIX PHP installed.
authorepriestley <epriestley@phabricator.com>
Thu, 3 Mar 2011 03:31:40 +0000 (19:31 -0800)
committerepriestley <epriestley@phabricator.com>
Thu, 3 Mar 2011 03:32:57 +0000 (19:32 -0800)
Summary: Some PHP installs don't have this by default. Do a conditional check
since this functionality is noncritical.

Test Plan: will make srash test

Reviewers: rash67, aran, jungejason

CC:

Differential Revision: 43

scripts/arcanist.php

index c3ec430887fc281d6c700b4411893f58ced41e5c..b456a4c2215f02a305546e3007819a30c1283cec 100755 (executable)
@@ -55,7 +55,8 @@ foreach ($args as $key => $arg) {
   }
 }
 
-if (!posix_isatty(STDOUT)) {
+// The POSIX extension is not available by default in some PHP installs.
+if (function_exists('posix_isatty') && !posix_isatty(STDOUT)) {
   PhutilConsoleFormatter::disableANSI(true);
 }