Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfigurationManager.php
Show First 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | if ($system_config === null) { | ||||
'Config: Did not find system configuration at "%s".', | 'Config: Did not find system configuration at "%s".', | ||||
$system_config_path)); | $system_config_path)); | ||||
} | } | ||||
} | } | ||||
return $system_config; | return $system_config; | ||||
} | } | ||||
public function applyRuntimeArcConfig($args) { | |||||
$arcanist_settings = new ArcanistSettings(); | |||||
$options = $args->getArg('config'); | |||||
foreach ($options as $opt) { | |||||
$opt_config = preg_split('/=/', $opt, 2); | |||||
if (count($opt_config) !== 2) { | |||||
throw new ArcanistUsageException("Argument was '{$opt}', but must be ". | |||||
"'name=value'. For example, history.immutable=true"); | |||||
} | |||||
list($key, $value) = $opt_config; | |||||
$value = $arcanist_settings->willWriteValue($key, $value); | |||||
$this->setRuntimeConfig($key, $value); | |||||
} | |||||
return $this->runtimeConfig; | |||||
} | |||||
public function readDefaultConfig() { | public function readDefaultConfig() { | ||||
$settings = new ArcanistSettings(); | $settings = new ArcanistSettings(); | ||||
return $settings->getDefaultSettings(); | return $settings->getDefaultSettings(); | ||||
} | } | ||||
} | } |