Skip to content

Fix/setup script compat#156

Closed
mrn55 wants to merge 2 commits into
solomon2773:masterfrom
mrn55:fix/setup-script-compat
Closed

Fix/setup script compat#156
mrn55 wants to merge 2 commits into
solomon2773:masterfrom
mrn55:fix/setup-script-compat

Conversation

@mrn55
Copy link
Copy Markdown
Contributor

@mrn55 mrn55 commented May 1, 2026

Summary

  • Require PowerShell 7+ for setup.ps1 so users fail fast instead of hitting Windows PowerShell 5 compatibility errors.
  • Fix setup secret generation by avoiding PowerShell’s case-insensitive $Bytes / $bytes variable collision.
  • Broaden .env ignore rules so generated .env backups are not shown as untracked files, while keeping tracked env templates available.

Validation

  • Ran setup.ps1 in PowerShell 7 through the Docker preflight and secret generation path.
  • Verified Windows PowerShell 5 exits immediately with the PowerShell 7 requirement.
  • Verified .env and .env.backup-* are ignored while .env.example, .env.test, and e2e/.env.real.example remain trackable.
  • Confirmed working tree was clean after commits.

Release And Docs Checklist

  • Updated public architecture docs (architecture.md) if this PR changes architecture, deployment topology, component responsibilities, or major data flow.
  • If this is a release-prep PR, updated the Reviewed for release: marker in architecture.md.

solomon2773 added a commit that referenced this pull request May 7, 2026
…ore (#157)

Fix New-HexSecret on PowerShell 7 — case-insensitive variable lookup made
the $Bytes parameter and $bytes local collide, breaking secret generation.
Rename the local to $secretBytes (and the parameter to $ByteCount with a
back-compat -Bytes alias) so existing callers like `New-HexSecret -Bytes 24`
keep working.

Broaden the .env ignore rule to cover generated `.env.backup-*` files while
explicitly allowlisting the three tracked templates (`.env.example`,
`.env.test`, `e2e/.env.real.example`).

Migrated from #156 by @mrn55. The PowerShell 7 version check from that PR
was already merged separately.

Co-authored-by: Neal <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@solomon2773
Copy link
Copy Markdown
Owner

Migrated to #157 (merged). The PowerShell 7 version check from this PR was already added to master separately; the New-HexSecret case-collision fix and .gitignore widening were carried over with attribution. Thanks @mrn55!

@solomon2773 solomon2773 closed this May 7, 2026
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.

2 participants