From 4013382170805d7a04a0943241627b346e8df08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Guti=C3=A9rrez=20Hermoso?= Date: Wed, 17 Jul 2024 13:39:03 -0400 Subject: [PATCH] config: replace fse read functions with sync variants I need to be able to read the config at module load time, which makes async difficult if not impossible. This will make read config operations synchronous, which is fine. The file is tiny and seldom read. --- app/server/lib/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/lib/config.ts b/app/server/lib/config.ts index 067198f7..3bc495fa 100644 --- a/app/server/lib/config.ts +++ b/app/server/lib/config.ts @@ -2,9 +2,9 @@ import * as fse from "fs-extra"; // Export dependencies for stubbing in tests. export const Deps = { - readFile: fse.readFile, + readFile: fse.readFileSync, writeFile: fse.writeFile, - pathExists: fse.pathExists, + pathExists: fse.pathExistsSync, }; /**