[PR #10808] fix(patch): parse Windows drive-letter paths #13565

Open
opened 2026-02-16 18:18:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10808

State: open
Merged: No


Why

On Windows, apply_patch headers like "*** Update File: D:..." were truncated at the drive letter because the patch header parser split on ':'; this produced paths like 'D' and caused apply_patch to fail.

Fixes #10360.

What

  • Parse patch header paths by slicing after the known header prefix instead of splitting on ':'
  • Add regression tests for drive-letter update and move paths

Test

  • bun test test/patch/patch.test.ts
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10808 **State:** open **Merged:** No --- ## Why On Windows, apply_patch headers like "*** Update File: D:\..." were truncated at the drive letter because the patch header parser split on ':'; this produced paths like 'D' and caused apply_patch to fail. Fixes #10360. ## What - Parse patch header paths by slicing after the known header prefix instead of splitting on ':' - Add regression tests for drive-letter update and move paths ## Test - bun test test/patch/patch.test.ts
yindo added the pull-request label 2026-02-16 18:18:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13565