Changeset View
Changeset View
Standalone View
Standalone View
scripts/arcanist.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
try { | try { | ||||
if ($config_trace_mode) { | if ($config_trace_mode) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"**<bg:magenta> %s </bg>** %s\n", | "**<bg:magenta> %s </bg>** %s\n", | ||||
pht('ARGV'), | pht('ARGV'), | ||||
csprintf('%Ls', $original_argv)); | csprintf('%Ls', $original_argv)); | ||||
$libraries = array( | $libraries = array( | ||||
'phutil', | |||||
'arcanist', | 'arcanist', | ||||
); | ); | ||||
foreach ($libraries as $library_name) { | foreach ($libraries as $library_name) { | ||||
echo tsprintf( | echo tsprintf( | ||||
"**<bg:magenta> %s </bg>** %s\n", | "**<bg:magenta> %s </bg>** %s\n", | ||||
pht('LOAD'), | pht('LOAD'), | ||||
pht( | pht( | ||||
▲ Show 20 Lines • Show All 523 Lines • ▼ Show 20 Lines | foreach ($load as $location) { | ||||
$console = PhutilConsole::getConsole(); | $console = PhutilConsole::getConsole(); | ||||
$console->writeLog( | $console->writeLog( | ||||
"%s\n", | "%s\n", | ||||
pht("Loading phutil library from '%s'...", $location)); | pht("Loading phutil library from '%s'...", $location)); | ||||
$error = null; | $error = null; | ||||
try { | try { | ||||
phutil_load_library($location); | require_once $location.'/__phutil_library_init__.php'; | ||||
} catch (PhutilBootloaderException $ex) { | } catch (PhutilBootloaderException $ex) { | ||||
$error = pht( | $error = pht( | ||||
"Failed to load phutil library at location '%s'. This library ". | "Failed to load phutil library at location '%s'. This library ". | ||||
"is specified by %s. Check that the setting is correct and the ". | "is specified by %s. Check that the setting is correct and the ". | ||||
"library is located in the right place.", | "library is located in the right place.", | ||||
$location, | $location, | ||||
$lib_source); | $lib_source); | ||||
if ($must_load) { | if ($must_load) { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |