mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: normalize command paths to base names in shellparse (#25599)
Normalize program names in shellparse.Parse to their basename. Does not rely on filepath.Base because the server may run on either Linux or Windows where the behavior would differ. Closes CODAGT-470
This commit is contained in:
Generated
+1
-1
@@ -16825,7 +16825,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"parsed_commands": {
|
||||
"description": "ParsedCommands holds parsed programs from an execute tool call's\nshell command, one entry per simple command in source order. Each\nentry is [program] or [program, arg] where arg is the first non-flag\npositional argument. Only populated when ToolName is \"execute\" and\nthe command parses successfully; nil otherwise.",
|
||||
"description": "ParsedCommands holds parsed programs from an execute tool call's\nshell command, one entry per simple command in source order. Each\nentry is [program] or [program, arg] where arg is the first non-flag\npositional argument. Program names are normalized to their base\nname (e.g. /usr/bin/go becomes go). Only populated when ToolName\nis \"execute\" and the command parses successfully; nil otherwise.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
|
||||
Reference in New Issue
Block a user