1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-21 22:32:41 +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:
epriestley 2014-05-13 11:36:56 -07:00
parent d826bf65c6
commit 85b6c581e1

View file

@ -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