From: epriestley Date: Thu, 3 Mar 2011 03:31:40 +0000 (-0800) Subject: Make 'arc' work for users without the POSIX PHP installed. X-Git-Tag: conduit-4~384^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f1b2cfa3f6afcc61972851d86c8475ba24b4ddac;p=arcanist.git Make 'arc' work for users without the POSIX PHP installed. 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 --- diff --git a/scripts/arcanist.php b/scripts/arcanist.php index c3ec4308..b456a4c2 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -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); }