Skip to content

Commit

Permalink
feat: catch missing env var
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Jan 19, 2024
1 parent 07fe1c5 commit 64b2f2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/esbuild-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ function createEnvDefines(variableNames: string[]): Record<string, string> {
const envVar = process.env[name];
if (envVar !== undefined) {
defines[`process.env.${name}`] = JSON.stringify(envVar);
} else {
throw new Error(`Missing environment variable: ${name}`);
}
}
return defines;
Expand Down

0 comments on commit 64b2f2c

Please sign in to comment.