Skip to content

Re-exec fm-brief.sh under bash 5+ when env resolves to macOS 3.2 - #1180

Closed
prandelicious wants to merge 3 commits into
kunchenguid:mainfrom
prandelicious:fm/fm-brief-bash32
Closed

Re-exec fm-brief.sh under bash 5+ when env resolves to macOS 3.2#1180
prandelicious wants to merge 3 commits into
kunchenguid:mainfrom
prandelicious:fm/fm-brief-bash32

Conversation

@prandelicious

Copy link
Copy Markdown

Summary

  • Add a re-exec prologue to bin/fm-brief.sh so brief scaffolding works when env bash resolves to macOS /bin/bash 3.2
  • Re-exec under bash 5+ (/opt/homebrew/bin/bash or /usr/local/bin/bash) before unparseable ship-mode DOD heredoc syntax is parsed
  • Generated brief output is unchanged; regression tests cover prologue parse, PATH re-exec success, and loud error when no modern bash exists

Test plan

  • bin/fm-lint.sh passes
  • tests/fm-brief.test.sh passes
  • Generated briefs byte-identical across no-mistakes, direct-PR, local-only, and scout modes
  • Scaffolding succeeds with PATH preferring /bin/bash 3.2 via re-exec

Made with Cursor

kunchenguid and others added 3 commits July 28, 2026 17:05
Move delivery-mode Definition-of-done text into helper functions so bash 3.2 no longer chokes on command-substitution heredocs before the outer brief heredoc, and assert /bin/bash -n in the regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
macOS PATH often resolves env bash to /bin/bash 3.2, which cannot parse
ship-mode DOD heredocs inside command substitution. Add an early prologue
that re-execs via Homebrew or /usr/local bash before that syntax is read,
with a loop guard and loud brew-install error when no modern bash exists.
Restore the original inline heredocs and add regression tests for re-exec.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kunchenguid

Copy link
Copy Markdown
Owner

thanks for digging into this. i merged #1093, which fixes the same macOS bash 3.2 parse failure by making fm-brief.sh itself 3.2-safe, so stock macOS works again without requiring a homebrew bash. closing this one as superseded. appreciate the help here.

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