1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Only inject legacy Arcanist workflows into "help" if run from the context of an Arcanist runtime

Summary: Ref T13490. This code is reachable from Phabricator binaries; only inject the legacy stuff if we're in an Arcanist stack.

Test Plan: Ran `bin/conduit help` from `phabricator/`.

Maniphest Tasks: T13490

Differential Revision: https://secure.phabricator.com/D21113
This commit is contained in:
epriestley 2020-04-14 12:45:49 -07:00
parent d408a80ae1
commit 9d0100bda7

View file

@ -40,6 +40,7 @@ EOHELP
$with = $args->getArg('help-with-what'); $with = $args->getArg('help-with-what');
$runtime = $this->getRuntime(); $runtime = $this->getRuntime();
if ($runtime) {
$toolset = $runtime->getToolset(); $toolset = $runtime->getToolset();
if ($toolset->getToolsetKey() === 'arc') { if ($toolset->getToolsetKey() === 'arc') {
$workflows = $args->getWorkflows(); $workflows = $args->getWorkflows();
@ -77,6 +78,7 @@ EOHELP
$args->setWorkflows($workflows); $args->setWorkflows($workflows);
} }
}
if (!$with) { if (!$with) {
$args->printHelpAndExit(); $args->printHelpAndExit();