From: epriestley Date: Wed, 16 Feb 2011 18:07:48 +0000 (-0800) Subject: Support --load-phutil-library in arcanist. X-Git-Tag: conduit-4~405 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1040046f3a8e0338396b23005cee5e914544177b;p=arcanist.git Support --load-phutil-library in arcanist. Summary: Test Plan: Reviewers: CC: --- diff --git a/scripts/arcanist.php b/scripts/arcanist.php index 6f1265ba..99af52e8 100755 --- a/scripts/arcanist.php +++ b/scripts/arcanist.php @@ -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) {