Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfigurationManager.php
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | public function getConfigFromAllSources($key) { | ||||
$pval = $this->getProjectConfig($key); | $pval = $this->getProjectConfig($key); | ||||
if ($pval !== null) { | if ($pval !== null) { | ||||
$results[self::CONFIG_SOURCE_PROJECT] = | $results[self::CONFIG_SOURCE_PROJECT] = | ||||
$settings->willReadValue($key, $pval); | $settings->willReadValue($key, $pval); | ||||
} | } | ||||
$user_config = $this->readUserArcConfig(); | $user_config = $this->readUserArcConfig(); | ||||
// For "aliases" coming from the user config file specifically, read the | |||||
// top level "aliases" key instead of the "aliases" key inside the "config" | |||||
// setting. Aliases were originally user-specific but later became standard | |||||
// configuration, which is why this works oddly. | |||||
if ($key === 'aliases') { | |||||
$pval = idx($this->readUserConfigurationFile(), $key); | |||||
} else { | |||||
$pval = idx($user_config, $key); | $pval = idx($user_config, $key); | ||||
} | |||||
if ($pval !== null) { | if ($pval !== null) { | ||||
$results[self::CONFIG_SOURCE_USER] = | $results[self::CONFIG_SOURCE_USER] = | ||||
$settings->willReadValue($key, $pval); | $settings->willReadValue($key, $pval); | ||||
} | } | ||||
$system_config = $this->readSystemArcConfig(); | $system_config = $this->readSystemArcConfig(); | ||||
$pval = idx($system_config, $key); | $pval = idx($system_config, $key); | ||||
if ($pval !== null) { | if ($pval !== null) { | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |