config: remove all async/await around config read functions

Now that reading is synchronous, there's no need to have any more
async/await in regards to the those config functions.
This commit is contained in:
Jordi Gutiérrez Hermoso
2024-07-17 17:46:28 -04:00
committed by jordigh
parent 4013382170
commit e30a090a4e
7 changed files with 20 additions and 20 deletions

View File

@@ -9,10 +9,10 @@ let cachedGlobalConfig: IGristCoreConfig | undefined = undefined;
/**
* Retrieves the cached grist config, or loads it from the default global path.
*/
export async function getGlobalConfig(): Promise<IGristCoreConfig> {
export function getGlobalConfig(): IGristCoreConfig {
if (!cachedGlobalConfig) {
log.info(`Loading config file from ${globalConfigPath}`);
cachedGlobalConfig = await loadGristCoreConfigFile(globalConfigPath);
cachedGlobalConfig = loadGristCoreConfigFile(globalConfigPath);
}
return cachedGlobalConfig;