mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33: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
@@ -156,7 +156,7 @@ async function handleBootstrapCommand(
|
||||
return;
|
||||
}
|
||||
let controlConfig = new lib.ControlConfig("control");
|
||||
await controlConfig.init();
|
||||
controlConfig.init();
|
||||
|
||||
controlConfig.set("control.controller_url", Controller.calculateControllerUrl(controllerConfig));
|
||||
controlConfig.set(
|
||||
@@ -325,12 +325,12 @@ async function initialize(): Promise<InitializeParameters> {
|
||||
const controllerConfig = new lib.ControllerConfig("controller");
|
||||
try {
|
||||
let fileData = await fs.readFile(controllerConfigPath, { encoding: "utf8" });
|
||||
await controllerConfig.load(JSON.parse(fileData));
|
||||
controllerConfig.load(JSON.parse(fileData));
|
||||
|
||||
} catch (err: any) {
|
||||
if (err.code === "ENOENT") {
|
||||
logger.info("Config not found, initializing new config");
|
||||
await controllerConfig.init();
|
||||
controllerConfig.init();
|
||||
|
||||
} else {
|
||||
throw new lib.StartupError(`Failed to load ${controllerConfigPath}: ${err.message}`);
|
||||
|
||||
Reference in new issue
Block a user