mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23: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
@@ -171,8 +171,7 @@ async function startHost() {
|
||||
const hostConfigPath = args.config;
|
||||
logger.info(`Loading config from ${hostConfigPath}`);
|
||||
try {
|
||||
const jsonConfig = JSON.parse(await fs.readFile(hostConfigPath, "utf8"));
|
||||
hostConfig = lib.HostConfig.fromJSON(jsonConfig, "host", hostConfigPath);
|
||||
hostConfig = await lib.HostConfig.fromFile("host", hostConfigPath);
|
||||
|
||||
} catch (err: any) {
|
||||
if (err.code === "ENOENT") {
|
||||
|
||||
Reference in new issue
Block a user