mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Support --load-phutil-library in arcanist.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
7ef47d3e15
commit
1040046f3a
1 changed files with 10 additions and 1 deletions
|
@ -32,12 +32,17 @@ phutil_require_module('arcanist', 'repository/api/base');
|
|||
|
||||
$config_trace_mode = false;
|
||||
$args = array_slice($argv, 1);
|
||||
$load = array();
|
||||
$matches = null;
|
||||
foreach ($args as $key => $arg) {
|
||||
if ($arg == '--') {
|
||||
break;
|
||||
} else if ($arg == '--trace') {
|
||||
unset($args[$key]);
|
||||
$config_trace_mode = true;
|
||||
} else if (preg_match('/^--load-phutil-library=(.*)$/', $arg, $matches)) {
|
||||
unset($args[$key]);
|
||||
$load['?'] = $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +59,11 @@ try {
|
|||
}
|
||||
|
||||
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($_SERVER['PWD']);
|
||||
$libs = $working_copy->getConfig('phutil_libraries');
|
||||
if ($load) {
|
||||
$libs = $load;
|
||||
} else {
|
||||
$libs = $working_copy->getConfig('phutil_libraries');
|
||||
}
|
||||
if ($libs) {
|
||||
foreach ($libs as $name => $location) {
|
||||
if ($config_trace_mode) {
|
||||
|
|
Loading…
Reference in a new issue