mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-22 21:40:54 +01:00
Read 'phabricator.uri' and 'default' out of more config sources
Summary: We have old/inconsistent code for reading these. Instead, read from sources in a modern way. Test Plan: - Removed "default" and "phabricator.uri" from user/local/project config. - Set "default" in "/etc/arcconfig". - Ran `arc tasks` and got a "connect to Phabricator" message. Reviewers: btrahan, davedash Reviewed By: davedash Subscribers: davedash, epriestley Differential Revision: https://secure.phabricator.com/D9105
This commit is contained in:
parent
d826bf65c6
commit
85b6c581e1
1 changed files with 5 additions and 5 deletions
|
@ -204,14 +204,14 @@ try {
|
|||
if ($force_conduit) {
|
||||
$conduit_uri = $force_conduit;
|
||||
} else {
|
||||
$project_conduit_uri = $configuration_manager->getProjectConfig(
|
||||
$conduit_uri = $configuration_manager->getConfigFromAnySource(
|
||||
'phabricator.uri');
|
||||
if ($project_conduit_uri) {
|
||||
$conduit_uri = $project_conduit_uri;
|
||||
} else {
|
||||
$conduit_uri = idx($global_config, 'default');
|
||||
if ($conduit_uri === null) {
|
||||
$conduit_uri = $configuration_manager->getConfigFromAnySource(
|
||||
'default');
|
||||
}
|
||||
}
|
||||
|
||||
if ($conduit_uri) {
|
||||
// Set the URI path to '/api/'. TODO: Originally, I contemplated letting
|
||||
// you deploy Phabricator somewhere other than the domain root, but ended
|
||||
|
|
Loading…
Reference in a new issue