1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-19 16:38:51 +02:00

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

Differential Revision: 43
Reviewed By: aran
Reviewers: rash67, aran, jungejason
CC: aran
This commit is contained in:
epriestley 2011-03-02 19:31:40 -08:00
parent d01dc4df37
commit a7cbae1dc6

View file

@ -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); PhutilConsoleFormatter::disableANSI(true);
} }