Files
e-tib.com/scripts/validate-env.ts
Marc Mintel 26d325df44
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 38s
Build & Deploy / 🧪 QA (push) Successful in 1m22s
Build & Deploy / 🏗️ Build (push) Successful in 4m27s
Build & Deploy / 🚀 Deploy (push) Failing after 39s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
fix(config): ensure analytics URL has protocol to prevent build crash
2026-05-12 13:01:18 +02:00

18 lines
507 B
TypeScript

import { envSchema, getRawEnv } from '../lib/env';
/**
* Simple script to validate environment variables.
* If validation fails, this script will exit with code 1.
*/
try {
const env = envSchema.parse(getRawEnv());
console.log('✅ Environment variables validated successfully.');
console.log('Base URL:', env.NEXT_PUBLIC_BASE_URL);
} catch (error) {
console.error('❌ Environment validation failed.');
if (error instanceof Error) {
console.error(error.message);
}
process.exit(1);
}