Skip to content

v1.33.3.0 fix: replace bash brace groups with subshells in build script for Windows compatibility#1460

Open
realcarsonterry wants to merge 2 commits into
garrytan:mainfrom
realcarsonterry:fix/windows-bun-build-brace-groups
Open

v1.33.3.0 fix: replace bash brace groups with subshells in build script for Windows compatibility#1460
realcarsonterry wants to merge 2 commits into
garrytan:mainfrom
realcarsonterry:fix/windows-bun-build-brace-groups

Conversation

@realcarsonterry
Copy link
Copy Markdown
Contributor

@realcarsonterry realcarsonterry commented May 13, 2026

Fixes #1457

Summary

On Windows with Git Bash + Bun, bun run build fails because Bun's Windows shell parser doesn't support bash brace groups { cmd; }.

Changes

Changed three occurrences in package.json line 12 from:

{ git rev-parse HEAD 2>/dev/null || true; } > path/.version

To POSIX-compliant subshells:

( git rev-parse HEAD 2>/dev/null || true ) > path/.version

Why This Works

  • Subshells ( ... ) are universally supported in POSIX bash, zsh, and Bun's Windows shell
  • Functionally equivalent for one-shot stdout redirection
  • No impact on Unix/Linux behavior
  • Allows Windows users to successfully run bun run build

Testing

Tested on Windows 11 with Git Bash + Bun 1.3.13 - build now completes successfully.

🤖 Generated with Claude Code


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

realcarsonterry and others added 2 commits May 13, 2026 11:33
…dows compatibility

Fixes garrytan#1457

On Windows with Git Bash + Bun, the build script fails because Bun's
Windows shell parser doesn't support bash brace groups { cmd; }.

Changed three occurrences of:
  { git rev-parse HEAD 2>/dev/null || true; } > path/.version

To POSIX-compliant subshells:
  ( git rev-parse HEAD 2>/dev/null || true ) > path/.version

Subshells are universally supported and functionally equivalent for
one-shot stdout redirection. This allows bun run build to succeed
on Windows without affecting Unix behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realcarsonterry realcarsonterry changed the title fix: replace bash brace groups with subshells in build script for Windows compatibility v1.33.3.0 fix: replace bash brace groups with subshells in build script for Windows compatibility May 13, 2026
@realcarsonterry
Copy link
Copy Markdown
Contributor Author

Needs Investigation

Status: Build-image step failing (infrastructure issue). The 'Sync PR title to VERSION' check also failed initially but may have been retriggered.

Impact: Fixes issue #1457 - Allows Windows users to run bun run build successfully by replacing bash brace groups with POSIX-compliant subshells.

Next step: The build-image failure appears to be a Docker registry permission issue, not related to the code changes. May need maintainer intervention or a workflow retrigger.

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.

Windows: bun run build fails with command not found: { — bash brace groups in package.json scripts.build

1 participant