feat: improve agent runtime update flow (#1982)

This commit is contained in:
Carlos Florêncio
2026-07-27 19:34:13 +01:00
committed by GitHub
parent b118a4fe98
commit 2bd2bae2ea
27 changed files with 1543 additions and 435 deletions
@@ -23,10 +23,13 @@ import (
func buildCommandString(cmd []string) string {
var parts []string
for _, arg := range cmd {
if strings.ContainsAny(arg, " \t\n\"'`$\\") {
switch {
case arg == "":
parts = append(parts, `""`)
case strings.ContainsAny(arg, " \t\n\"'`$\\"):
escaped := strings.ReplaceAll(arg, "\"", "\\\"")
parts = append(parts, "\""+escaped+"\"")
} else {
default:
parts = append(parts, arg)
}
}