Changeset View
Changeset View
Standalone View
Standalone View
scripts/arcanist.php
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | try { | ||||
$command = strtolower($args[0]); | $command = strtolower($args[0]); | ||||
$args = array_slice($args, 1); | $args = array_slice($args, 1); | ||||
$workflow = $config->selectWorkflow($command, $args, $working_copy, $console); | $workflow = $config->selectWorkflow($command, $args, $working_copy, $console); | ||||
$workflow->setArcanistConfiguration($config); | $workflow->setArcanistConfiguration($config); | ||||
$workflow->setCommand($command); | $workflow->setCommand($command); | ||||
$workflow->setWorkingDirectory($working_directory); | $workflow->setWorkingDirectory($working_directory); | ||||
$workflow->parseArguments($args); | $workflow->parseArguments($args); | ||||
// Write the command into the environment so that scripts (for example, local | |||||
// Git commit hooks) can detect that they're being run via `arc` and change | |||||
// their behaviors. | |||||
putenv('ARCANIST='.$command); | |||||
if ($force_conduit_version) { | if ($force_conduit_version) { | ||||
$workflow->forceConduitVersion($force_conduit_version); | $workflow->forceConduitVersion($force_conduit_version); | ||||
} | } | ||||
if ($conduit_timeout) { | if ($conduit_timeout) { | ||||
$workflow->setConduitTimeout($conduit_timeout); | $workflow->setConduitTimeout($conduit_timeout); | ||||
} | } | ||||
$need_working_copy = $workflow->requiresWorkingCopy(); | $need_working_copy = $workflow->requiresWorkingCopy(); | ||||
▲ Show 20 Lines • Show All 439 Lines • Show Last 20 Lines |