fix: handleExec ersetzt winget durch vollen Pfad automatisch

This commit is contained in:
cynfo3000 2026-03-10 02:24:59 +01:00
parent 0f496a54e7
commit 154d1bd8c8

View File

@ -105,6 +105,13 @@ func (h *Handler) handleExec(msg Message) Message {
return resp return resp
} }
// winget durch vollen Pfad ersetzen falls noetig
if strings.Contains(command, "winget") {
if wp := h.winget(); wp != "" {
command = strings.ReplaceAll(command, "winget ", fmt.Sprintf(`& "%s" `, wp))
}
}
timeoutSecs := 60 timeoutSecs := 60
if t, ok := data["timeout"].(float64); ok && t > 0 { if t, ok := data["timeout"].(float64); ok && t > 0 {
timeoutSecs = int(t) timeoutSecs = int(t)