fix: preserve argument boundaries in run command (#4979)

pull/5625/head
Simon D'Morias 2025-12-16 12:21:51 +00:00 committed by GitHub
parent f0ed1e38c9
commit be8116e2ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ export const RunCommand = cmd({
})
},
handler: async (args) => {
let message = [...args.message, ...(args["--"] || [])].join(" ")
let message = [...args.message, ...(args["--"] || [])]
.map((arg) => (arg.includes(" ") ? `"${arg.replace(/"/g, '\\"')}"` : arg))
.join(" ")
const fileParts: any[] = []
if (args.file) {