diff options
| author | Khang Ha (Kelvin) <[email protected]> | 2026-02-07 05:16:56 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-06 16:16:56 -0600 |
| commit | fde0b39b7c97dacb78cb55f3d963aa54f61650ea (patch) | |
| tree | 066ebb3f0a2716c9e0ee8e72b55239ad249cd5d1 /script/duplicate-pr.ts | |
| parent | e9a3cfc083bf480ba2c8aaa585a4e914549e3e56 (diff) | |
| download | opencode-fde0b39b7c97dacb78cb55f3d963aa54f61650ea.tar.gz opencode-fde0b39b7c97dacb78cb55f3d963aa54f61650ea.zip | |
fix: properly encode file URLs with special characters (#12424)
Diffstat (limited to 'script/duplicate-pr.ts')
| -rwxr-xr-x | script/duplicate-pr.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/duplicate-pr.ts b/script/duplicate-pr.ts index aba078cec..b77737c1d 100755 --- a/script/duplicate-pr.ts +++ b/script/duplicate-pr.ts @@ -1,6 +1,7 @@ #!/usr/bin/env bun import path from "path" +import { pathToFileURL } from "bun" import { createOpencode } from "@opencode-ai/sdk" import { parseArgs } from "util" @@ -49,7 +50,7 @@ Examples: } parts.push({ type: "file", - url: `file://${resolved}`, + url: pathToFileURL(resolved).href, filename: path.basename(resolved), mime: "text/plain", }) |
