docs,config: aggiorna AGENTS.md, config.example, HOST-SETUP.md, checklist faseA e fix vari orchestrator (workstation, build, job, wait, winrm, test)

This commit is contained in:
Simone
2026-05-17 00:14:04 +02:00
parent dc8449a0d7
commit e810747557
10 changed files with 135 additions and 52 deletions
+6 -2
View File
@@ -116,11 +116,15 @@ class WinRmTransport:
stdout, stderr, returncode = client.execute_ps(script)
except Exception as exc:
raise TransportConnectError(f"WinRM execute_ps failed: {exc}") from exc
# pypsrp returns stderr as a list of PSRP error records in some versions;
# normalise to a string.
# pypsrp returns stderr as a PSDataStreams object (newer versions) or a
# list of error records (older versions); normalise to a plain string.
stderr_any: Any = stderr
if isinstance(stderr_any, str):
stderr_str = stderr_any
elif hasattr(stderr_any, "error"):
# PSDataStreams — extract .error records.
error_records = getattr(stderr_any, "error", None) or []
stderr_str = "\n".join(str(e) for e in error_records)
else:
try:
stderr_str = "\n".join(str(s) for s in stderr_any)