mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
Remove silly support for async initial_value
This complicates the handling of configs for no good reason.
This commit is contained in:
1 parent
ede150d80f
commit
27af142a87
15 files changed
+93
-93
No files matched your search
+2
-2
@@ -221,12 +221,12 @@ async function startControl() {
|
||||
logger.verbose(`Loading config from ${args.config}`);
|
||||
let controlConfig = new lib.ControlConfig("control");
|
||||
try {
|
||||
await controlConfig.load(JSON.parse(await fs.readFile(args.config, "utf8")));
|
||||
controlConfig.load(JSON.parse(await fs.readFile(args.config, "utf8")));
|
||||
|
||||
} catch (err: any) {
|
||||
if (err.code === "ENOENT") {
|
||||
logger.verbose("Config not found, initializing new config");
|
||||
await controlConfig.init();
|
||||
controlConfig.init();
|
||||
|
||||
} else {
|
||||
throw new lib.StartupError(`Failed to load ${args.config}: ${err.message}`);
|
||||
|
||||
Reference in new issue
Block a user