mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +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
@@ -148,12 +148,12 @@ async function startHost() {
|
||||
logger.info(`Loading config from ${args.config}`);
|
||||
let hostConfig = new lib.HostConfig("host");
|
||||
try {
|
||||
await hostConfig.load(JSON.parse(await fs.readFile(args.config, "utf8")));
|
||||
hostConfig.load(JSON.parse(await fs.readFile(args.config, "utf8")));
|
||||
|
||||
} catch (err: any) {
|
||||
if (err.code === "ENOENT") {
|
||||
logger.info("Config not found, initializing new config");
|
||||
await hostConfig.init();
|
||||
hostConfig.init();
|
||||
|
||||
} else {
|
||||
throw new lib.StartupError(`Failed to load ${args.config}: ${err.message}`);
|
||||
|
||||
Reference in new issue
Block a user