runPatch runs package manager update and upgrade (patch_all) or install (patch_package). Supports apt-get (Debian/Ubuntu), dnf, yum (RHEL-based), pkg (FreeBSD), pacman (Arch), and windows (WinGet for applications + WUA COM API for OS updates). formatCmd returns a shell-style "$ command args..." line
(name string, args ...string)
| 2046 | // and windows (WinGet for applications + WUA COM API for OS updates). |
| 2047 | // formatCmd returns a shell-style "$ command args..." line for display in output. |
| 2048 | func formatCmd(name string, args ...string) string { |
| 2049 | parts := append([]string{name}, args...) |
| 2050 | return "$ " + strings.Join(parts, " ") + "\n" |
| 2051 | } |
| 2052 | |
| 2053 | // streamSink accumulates stdout+stderr bytes from streaming patch-run commands, |
| 2054 | // appends them to a fullOutput builder, and periodically POSTs stage="progress" |