mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 01:25:21 +02:00
fix: extract duplicate config loading (#4242)
Also fix a problem with bin/cache-prune and FileCache and its enable_purge option
This commit is contained in:
parent
9f48370eb0
commit
3e1a8b29d9
8 changed files with 36 additions and 80 deletions
11
bin/test
11
bin/test
|
@ -6,16 +6,7 @@
|
|||
*/
|
||||
|
||||
require __DIR__ . '/../lib/bootstrap.php';
|
||||
|
||||
$config = [];
|
||||
if (file_exists(__DIR__ . '/../config.ini.php')) {
|
||||
$config = parse_ini_file(__DIR__ . '/../config.ini.php', true, INI_SCANNER_TYPED);
|
||||
if (!$config) {
|
||||
http_response_code(500);
|
||||
exit("Error parsing config.ini.php\n");
|
||||
}
|
||||
}
|
||||
Configuration::loadConfiguration($config, getenv());
|
||||
require __DIR__ . '/../lib/config.php';
|
||||
|
||||
$container = require __DIR__ . '/../lib/dependencies.php';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue