Skip to content

Commit

Permalink
Read 'phabricator.uri' and 'default' out of more config sources
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epriestley committed May 13, 2014
1 parent d826bf6 commit 85b6c58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/arcanist.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@
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
Expand Down

0 comments on commit 85b6c58

Please sign in to comment.