diff --git a/packages/cli/src/util/configLoader.ts b/packages/cli/src/util/configLoader.ts index 89527d84c..e9781af7f 100644 --- a/packages/cli/src/util/configLoader.ts +++ b/packages/cli/src/util/configLoader.ts @@ -23,11 +23,9 @@ let configPromise: Promise | undefined = function getConfig(): Promise { if (configPromise == null) { - try { - configPromise = loadFoundryConfig(); - } catch (e) { + configPromise = loadFoundryConfig().catch((e) => { throw new ExitProcessError(2, e instanceof Error ? e.message : undefined); - } + }); } return configPromise; }