fix(scripts): bootstrap aborts on fresh checkouts missing the legacy auth secret - #802
fix(scripts): bootstrap aborts on fresh checkouts missing the legacy auth secret#802Zach Dunn (zachdunn) wants to merge 1 commit into
Conversation
…is absent Under `set -euo pipefail`, the BETTER_AUTH_SECRET_DEV carry-over grep exits 1 whenever apps/auth/.dev.vars has no legacy line — which is every fresh checkout or worktree since #754 renamed it to BETTER_AUTH_SECRET — and pipefail turns that into a hard abort mid-"Scaffolding env files", killing scripts/dev-stack.mjs before any service starts. Tolerate the no-match case; the empty-value fallback on the next line already handles it.
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
scripts/bootstrap.shruns underset -euo pipefail. The #754 carry-over lineAUTH_SECRET_VALUE="$(grep -E '^BETTER_AUTH_SECRET_DEV=.+$' "$AUTH_DEV_VARS" 2>/dev/null | head -n1 | cut -d= -f2-)"exits 1 via pipefail when
apps/auth/.dev.varshas no legacyBETTER_AUTH_SECRET_DEVline — true for every fresh checkout/worktree since the rename — soset -eaborts the whole bootstrap during "Scaffolding env files" andnode scripts/dev-stack.mjsdies before starting anything. Append|| trueinside the substitution; the existing empty-value fallback on the next line already mints a fresh secret.Verification
In a worktree whose
apps/auth/.dev.varscontains onlyBETTER_AUTH_SECRET(no legacy line):bash scripts/bootstrap.sh --skip-db --skip-workspacepreviously died after the WORKSPACE_SECRETS_KEY step with exit 1; with this change it runs to completion (exit 0).