From f1b2cfa3f6afcc61972851d86c8475ba24b4ddac Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 2 Mar 2011 19:31:40 -0800 Subject: [PATCH] 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 --- scripts/arcanist.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }