Skip to content

fix: use WriteAllText with UTF8NoBOM in Register-AntigravityMcp (#410) - #411

Closed
rafaio1 wants to merge 1 commit into
monk-io:mainfrom
rafaio1:fix/antigravity-mcp-utf8-bom-410
Closed

fix: use WriteAllText with UTF8NoBOM in Register-AntigravityMcp (#410)#411
rafaio1 wants to merge 1 commit into
monk-io:mainfrom
rafaio1:fix/antigravity-mcp-utf8-bom-410

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Fixes #410

Set-Content -Encoding UTF8 writes a UTF-8 BOM (EF BB BF) on Windows PowerShell 5.1, which breaks JSON parsers that do not expect it. This PR replaces the call with [System.IO.File]::WriteAllText using UTF8Encoding($false) to emit clean UTF-8 without BOM across all three copies of start-monk-agent.ps1.

Changes

  • scripts/start-monk-agent.ps1 line 164
  • plugins/monk/scripts/start-monk-agent.ps1 line 164
  • .antigravity-plugin/scripts/start-monk-agent.ps1 line 164

Verification

The fix uses the same pattern recommended by Microsoft for BOM-free UTF-8 output in Windows PowerShell 5.1 and is compatible with PowerShell 7+.

Payout: 877hj5d4ya4N2B5gPsazm1dudN61Fkjz1V9izhD5m2TU (Solana)

Set-Content -Encoding UTF8 writes a BOM (EF BB BF) on Windows PowerShell 5.1,
which breaks JSON parsers that don't expect it. Replace with
[System.IO.File]::WriteAllText using UTF8Encoding($false) to emit clean UTF-8.

Fixes monk-io#410

Payout: 877hj5d4ya4N2B5gPsazm1dudN61Fkjz1V9izhD5m2TU (Solana)
@nooga

nooga commented Aug 31, 2026

Copy link
Copy Markdown
Member

Closing this one — #368 covers the same fix for #367/#410 and is the version we're taking forward. Thanks for taking a look.

A note for future submissions: please don't put payment or wallet addresses in pull request descriptions. Bounty scoring and any payout are handled through the process described in the bounty rules, never through details posted in a PR.

@nooga nooga added the duplicate This issue or pull request already exists label Aug 31, 2026
@nooga nooga closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug bounty] Register-AntigravityMcp writes UTF-8 BOM into Antigravity mcp_config.json on Windows PowerShell

2 participants