mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Add tests for save and load
This commit is contained in:
3 files changed
+169
-4
No files matched your search
+1
-2
@@ -213,8 +213,7 @@ async function startControl() {
|
||||
const controlConfigPath = args.config;
|
||||
logger.verbose(`Loading config from ${controlConfigPath}`);
|
||||
try {
|
||||
const jsonConfig = JSON.parse(await fs.readFile(controlConfigPath, "utf8"));
|
||||
controlConfig = lib.ControlConfig.fromJSON(jsonConfig, "control", controlConfigPath);
|
||||
controlConfig = await lib.ControlConfig.fromFile("control", controlConfigPath);
|
||||
|
||||
} catch (err: any) {
|
||||
if (err.code === "ENOENT") {
|
||||
|
||||
Reference in new issue
Block a user