mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
resolveInlineRenamedEnvVar collapsed empty-string and unreplaced-sentinel values to `undefined` via its `|| ... || undefined` tail. The pre-rename inline (`process.env.HEXCLAVE ?? process.env.STACK`) returned the raw value, so an unset NEXT_PUBLIC_* var (which Next inlines as "") came through as "" and downstream `getPublicEnvVar(...) ?? throwErr(...)` readers were satisfied. Returning `undefined` instead made those `?? throwErr` checks fire during `next build` page-data collection (e.g. the AI companion widget's NEXT_PUBLIC_BROWSER_STACK_API_URL read), crashing the dashboard build in the check-prisma-migrations job (which builds the dashboard via the CLI's rde-standalone bundle). Restore the `??` passthrough for the raw fallback so empty/sentinel values are preserved, while keeping conflict detection and the empty-as-unset shadowing protection (a real STACK value is still returned over an empty HEXCLAVE one). Verified: dashboard `next build` collects page data without throwing. |
||
|---|---|---|
| .. | ||
| backend | ||
| dashboard | ||
| dev-launchpad | ||
| e2e | ||
| hosted-components | ||
| internal-tool | ||
| mcp | ||
| mock-oauth-server | ||
| oauth-mock-server | ||
| skills | ||