mirror of
git://code.qt.io/qt/qt5.git
synced 2026-07-17 03:52:22 +08:00
Add Run-Executable-With-Timeout, a wrapper around Run-Executable that takes a timeout in seconds as its first argument. Run-Executable gains an internal -TimeoutSeconds parameter (default 0 = no timeout, all existing callers unaffected) used by the new wrapper. Apply a generous timeout to the Notepad++ silent installer, which was observed hanging for ~14 hours and causing provisioning CANCELED failures on Windows 11 24H2 machines. Cache the process handle ($null = $p.Handle) immediately after Start-Process -PassThru. Without this, $p.ExitCode reads back as $null after the process exits, which made Run-Executable spuriously throw "Process <exe> exited with exit code " (blank) on successful runs. This race was observed in provisioning logs for certutil.exe in the certificate-updates step. Change-Id: Icc66b670a3d40d67d1b6251913a06dbffeffaec2 Reviewed-by: Elias Toivola <elias.toivola@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>