Files
bun.sh/scripts
robobun bbeab8726f fix(build): quote CMake variables to prevent semicolons breaking the build (#27663)
## Summary

- **SetupBuildkite.cmake**: The Buildkite API returns build JSON that
includes commit messages. Semicolons in commit messages (e.g. `fix:
handle edge cases; add tests`) cause CMake's unquoted `string(JSON ...
GET ${VAR} ...)` calls to split the JSON at every `;` (CMake's list
separator), resulting in garbled arguments and `FATAL_ERROR`. Fix:
escape semicolons before parsing and quote all JSON variable expansions.
- **Globals.cmake**: The `optionx()` macro reads environment variables
with `$ENV{...}` without quoting, so any env var containing a semicolon
would be split into a CMake list. Fix: quote the expansion.
- **Options.cmake / BuildBun.cmake**: Quote `REVISION`, `VERSION`,
`CODEGEN_PATH`, and other variables passed as `-D` flags to the Zig
build, preventing semicolons or special characters from splitting them.
- **utils.mjs `toYaml()`**: The YAML serializer only quoted strings
containing `:`, `#`, `'`, `"`, `\n`, `*`. Missing: `;`, `[`, `]`, `{`,
`}`, `&`, `!`, `|`, `>`, `%`, `@`, `` ` ``, `,`, `\`. Also now properly
escapes backslashes before quotes in double-quoted YAML strings.

## Test plan

- [x] `bun bd` builds successfully with these changes
- [x] Verified `toYaml()` correctly quotes strings with special
characters and leaves plain strings unquoted
- [ ] CI should pass with a commit message containing semicolons (this
PR's own CI run serves as a test)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-28 23:35:41 -08:00
..
2026-02-18 18:08:10 -08:00
2024-10-25 23:50:12 -07:00
2026-02-18 18:08:10 -08:00
2025-11-23 15:09:43 -08:00
2025-11-23 15:09:43 -08:00
2025-11-23 15:09:43 -08:00
2026-02-25 20:55:23 -08:00
2025-01-16 22:40:39 -08:00
2025-11-10 14:38:26 -08:00
2024-12-12 03:21:56 -08:00
2025-09-14 18:48:26 -07:00
fmt
2025-09-12 17:24:47 -07:00
2024-08-27 14:13:21 -07:00
2026-02-18 18:08:10 -08:00
2025-07-10 00:10:43 -07:00
2024-06-14 14:52:20 -07:00
2024-12-12 03:21:56 -08:00
2026-02-25 20:55:23 -08:00
2026-02-18 18:08:10 -08:00