Skip to content

fix(scripts): bootstrap aborts on fresh checkouts missing the legacy auth secret - #802

Open
Zach Dunn (zachdunn) wants to merge 1 commit into
mainfrom
fix/bootstrap-legacy-secret-grep
Open

fix(scripts): bootstrap aborts on fresh checkouts missing the legacy auth secret#802
Zach Dunn (zachdunn) wants to merge 1 commit into
mainfrom
fix/bootstrap-legacy-secret-grep

Conversation

@zachdunn

Copy link
Copy Markdown
Member

Summary

scripts/bootstrap.sh runs under set -euo pipefail. The #754 carry-over line

AUTH_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.vars has no legacy BETTER_AUTH_SECRET_DEV line — true for every fresh checkout/worktree since the rename — so set -e aborts the whole bootstrap during "Scaffolding env files" and node scripts/dev-stack.mjs dies before starting anything. Append || true inside the substitution; the existing empty-value fallback on the next line already mints a fresh secret.

Verification

In a worktree whose apps/auth/.dev.vars contains only BETTER_AUTH_SECRET (no legacy line): bash scripts/bootstrap.sh --skip-db --skip-workspace previously died after the WORKSPACE_SECRETS_KEY step with exit 1; with this change it runs to completion (exit 0).

…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.
@changeset-bot

changeset-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9aa0f7b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (2)
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed) (1)
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 050ca47e-8a29-4000-a1ed-6708b13be371

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant