Changeset View
Changeset View
Standalone View
Standalone View
scripts/init/init-arcanist.php
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | private function executeCore(array $argv) { | ||||
| $phutil_workflows = array(); | $phutil_workflows = array(); | ||||
| foreach ($workflows as $key => $workflow) { | foreach ($workflows as $key => $workflow) { | ||||
| $phutil_workflows[$key] = $workflow->newPhutilWorkflow(); | $phutil_workflows[$key] = $workflow->newPhutilWorkflow(); | ||||
| } | } | ||||
| $unconsumed_argv = $args->getUnconsumedArgumentVector(); | $unconsumed_argv = $args->getUnconsumedArgumentVector(); | ||||
| if (!$unconsumed_argv) { | |||||
| // TOOLSETS: This means the user just ran "arc" or some other top-level | |||||
| // toolset without any workflow argument. We should give them a summary | |||||
| // of the toolset, a list of workflows, and a pointer to "arc help" for | |||||
| // more details. | |||||
| // A possible exception is "arc --help", which should perhaps pass | |||||
| // through and act like "arc help". | |||||
| throw new PhutilArgumentUsageException(pht('Choose a workflow!')); | |||||
| } | |||||
| $result = $this->resolveAliases($workflows, $unconsumed_argv, $config); | $result = $this->resolveAliases($workflows, $unconsumed_argv, $config); | ||||
| if (is_int($result)) { | if (is_int($result)) { | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| $args->setUnconsumedArgumentVector($result); | $args->setUnconsumedArgumentVector($result); | ||||
| return $args->parseWorkflows($phutil_workflows); | return $args->parseWorkflows($phutil_workflows); | ||||
| ▲ Show 20 Lines • Show All 493 Lines • Show Last 20 Lines | |||||