From f619398039509adb6fb29b23ee3206c0a034d7aa Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Mon, 25 Sep 2023 16:54:45 +0900 Subject: [PATCH] fix: make error more informative --- packages/shared-lib-node/src/env.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/shared-lib-node/src/env.ts b/packages/shared-lib-node/src/env.ts index 75041321..99485338 100644 --- a/packages/shared-lib-node/src/env.ts +++ b/packages/shared-lib-node/src/env.ts @@ -70,11 +70,8 @@ export function loadEnvironmentVariables(argv: Options, cwd: string): Record !(key in envVars)); + throw new Error(`Missing environment variables in [${envPaths.join(', ')}]: [${missingKeys.join(', ')}]`); } return envVars; }