mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Add --skip-arcconfig option
Summary: Continuation of D4732 - when we don't care about loading an arcconfig, allow that to be specified. Test Plan: chmod -r .arcconfig; bin/arc help --skip-arcconfig Reviewers: epriestley, vrana Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4750
This commit is contained in:
parent
3f747be644
commit
dff1342efc
2 changed files with 14 additions and 1 deletions
|
@ -18,6 +18,9 @@ $args->parsePartial(
|
||||||
'help' => 'Load a libphutil library.',
|
'help' => 'Load a libphutil library.',
|
||||||
'repeat' => true,
|
'repeat' => true,
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'skip-arcconfig',
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'name' => 'conduit-uri',
|
'name' => 'conduit-uri',
|
||||||
'param' => 'uri',
|
'param' => 'uri',
|
||||||
|
@ -40,6 +43,7 @@ $config_trace_mode = $args->getArg('trace');
|
||||||
$force_conduit = $args->getArg('conduit-uri');
|
$force_conduit = $args->getArg('conduit-uri');
|
||||||
$force_conduit_version = $args->getArg('conduit-version');
|
$force_conduit_version = $args->getArg('conduit-version');
|
||||||
$conduit_timeout = $args->getArg('conduit-timeout');
|
$conduit_timeout = $args->getArg('conduit-timeout');
|
||||||
|
$skip_arcconfig = $args->getArg('skip-arcconfig');
|
||||||
$load = $args->getArg('load-phutil-library');
|
$load = $args->getArg('load-phutil-library');
|
||||||
$help = $args->getArg('help');
|
$help = $args->getArg('help');
|
||||||
|
|
||||||
|
@ -72,7 +76,12 @@ try {
|
||||||
|
|
||||||
$global_config = ArcanistBaseWorkflow::readGlobalArcConfig();
|
$global_config = ArcanistBaseWorkflow::readGlobalArcConfig();
|
||||||
$system_config = ArcanistBaseWorkflow::readSystemArcConfig();
|
$system_config = ArcanistBaseWorkflow::readSystemArcConfig();
|
||||||
$working_copy = ArcanistWorkingCopyIdentity::newFromPath($working_directory);
|
if ($skip_arcconfig) {
|
||||||
|
$working_copy = ArcanistWorkingCopyIdentity::newDummyWorkingCopy();
|
||||||
|
} else {
|
||||||
|
$working_copy =
|
||||||
|
ArcanistWorkingCopyIdentity::newFromPath($working_directory);
|
||||||
|
}
|
||||||
|
|
||||||
reenter_if_this_is_arcanist_or_libphutil(
|
reenter_if_this_is_arcanist_or_libphutil(
|
||||||
$console,
|
$console,
|
||||||
|
|
|
@ -14,6 +14,10 @@ final class ArcanistWorkingCopyIdentity {
|
||||||
protected $projectConfig;
|
protected $projectConfig;
|
||||||
protected $projectRoot;
|
protected $projectRoot;
|
||||||
|
|
||||||
|
public static function newDummyWorkingCopy() {
|
||||||
|
return new ArcanistWorkingCopyIdentity('/', array());
|
||||||
|
}
|
||||||
|
|
||||||
public static function newFromPath($path) {
|
public static function newFromPath($path) {
|
||||||
$project_id = null;
|
$project_id = null;
|
||||||
$project_root = null;
|
$project_root = null;
|
||||||
|
|
Loading…
Reference in a new issue