Enterprise-CMCS/macpro-mako

View on GitHub
bin/cli/src/lib/env.ts

Summary

Maintainability
A
0 mins
Test Coverage
export function validateEnvVariable(variableName: string): string {
  const value = process.env[variableName];
  if (!value) {
    throw new Error(
      `Environment variable ${variableName} is required but not set`,
    );
  }
  return value;
}