Enterprise-CMCS/macpro-mako

View on GitHub
lib/libs/env.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export function checkEnvVars(requiredVars: string[]) {
  const missingVars = requiredVars.filter((v) => !process.env[v]);
  if (missingVars.length > 0) {
    throw new Error(
      `Missing required environment variables: ${missingVars.join(", ")}`
    );
  }
}