fix: -OutputEncoding entfernt (inkompatibel), KB null-safe, exec via PS
This commit is contained in:
@@ -235,9 +235,7 @@ func (h *Handler) handleReboot(msg Message) Message {
|
||||
// Hilfsfunktionen
|
||||
|
||||
func runWithTimeout(command string, timeoutSecs int) (string, error) {
|
||||
// PowerShell verwenden — unterstuetzt winget, UTF-8, moderne Windows-Befehle
|
||||
cmd := exec.Command("powershell", "-NoProfile", "-NonInteractive",
|
||||
"-OutputEncoding", "UTF8", "-Command", command)
|
||||
cmd := exec.Command("powershell", "-NoProfile", "-NonInteractive", "-Command", command)
|
||||
out, err := withTimeout(cmd, time.Duration(timeoutSecs)*time.Second)
|
||||
return out, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user