feat(core-shared): add requireEnv helper
This commit is contained in:
7
packages/core-shared/src/lib/env.ts
Normal file
7
packages/core-shared/src/lib/env.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function requireEnv(name: string): string {
|
||||
const value = process.env[name];
|
||||
if (!value) {
|
||||
throw new Error(`Missing required env var: ${name}`);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user