Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit be8116e

Browse files
authored
fix: preserve argument boundaries in run command (anomalyco#4979)
1 parent f0ed1e3 commit be8116e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/opencode/src/cli/cmd

packages/opencode/src/cli/cmd/run.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export const RunCommand = cmd({
8888
})
8989
},
9090
handler: async (args) => {
91-
let message = [...args.message, ...(args["--"] || [])].join(" ")
91+
let message = [...args.message, ...(args["--"] || [])]
92+
.map((arg) => (arg.includes(" ") ? `"${arg.replace(/"/g, '\\"')}"` : arg))
93+
.join(" ")
9294

9395
const fileParts: any[] = []
9496
if (args.file) {

0 commit comments

Comments
 (0)