mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Respect --no-ansi and disable ansi for non-TTY terminals.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
a3466fcb6d
commit
964030050b
1 changed files with 7 additions and 0 deletions
|
@ -40,12 +40,19 @@ foreach ($args as $key => $arg) {
|
|||
} else if ($arg == '--trace') {
|
||||
unset($args[$key]);
|
||||
$config_trace_mode = true;
|
||||
} else if ($arg == '--no-ansi') {
|
||||
unset($args[$key]);
|
||||
PhutilConsoleFormatter::disableANSI(true);
|
||||
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
||||
unset($args[$key]);
|
||||
$load['?'] = $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (!posix_isatty(STDOUT)) {
|
||||
PhutilConsoleFormatter::disableANSI(true);
|
||||
}
|
||||
|
||||
$args = array_values($args);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue