mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 02:02:40 +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:
parent
d408a80ae1
commit
9d0100bda7
1 changed files with 32 additions and 30 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue