* expected local.config.php
*
* @param IConfigCache $config The config cache to load to
+ * @param bool $raw Setup the raw config format
*
* @throws \Exception
*/
- public function setupCache(IConfigCache $config)
+ public function setupCache(IConfigCache $config, $raw = false)
{
$config->load($this->loadCoreConfig('defaults'));
$config->load($this->loadCoreConfig('settings'));
$config->load($this->loadCoreConfig('local'), true);
// In case of install mode, add the found basepath (because there isn't a basepath set yet
- if ($this->appMode->isInstall()) {
+ if (!$raw && ($this->appMode->isInstall() || empty($config->get('system', 'basepath')))) {
// Setting at least the basepath we know
$config->set('system', 'basepath', $this->baseDir);
}