mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +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') {
|
} else if ($arg == '--trace') {
|
||||||
unset($args[$key]);
|
unset($args[$key]);
|
||||||
$config_trace_mode = true;
|
$config_trace_mode = true;
|
||||||
|
} else if ($arg == '--no-ansi') {
|
||||||
|
unset($args[$key]);
|
||||||
|
PhutilConsoleFormatter::disableANSI(true);
|
||||||
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
||||||
unset($args[$key]);
|
unset($args[$key]);
|
||||||
$load['?'] = $matches[1];
|
$load['?'] = $matches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!posix_isatty(STDOUT)) {
|
||||||
|
PhutilConsoleFormatter::disableANSI(true);
|
||||||
|
}
|
||||||
|
|
||||||
$args = array_values($args);
|
$args = array_values($args);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue