mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Extract method
This commit is contained in:
@@ -106,7 +106,7 @@ class InstallCommand extends Command
|
|||||||
|
|
||||||
$this->enableBundledExtensions();
|
$this->enableBundledExtensions();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@unlink(base_path('../config.php'));
|
@unlink($this->getConfigFile());
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ class InstallCommand extends Command
|
|||||||
$this->info('Writing config');
|
$this->info('Writing config');
|
||||||
|
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
base_path('../config.php'),
|
$this->getConfigFile(),
|
||||||
'<?php return '.var_export($config, true).';'
|
'<?php return '.var_export($config, true).';'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -252,4 +252,9 @@ class InstallCommand extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getConfigFile()
|
||||||
|
{
|
||||||
|
return base_path('../config.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user