From 408772272bd7a3c255a2b9e49c893b28ee83108d Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Thu, 8 Aug 2024 20:29:56 +0100 Subject: [PATCH] Make certain that async stdout streams are fully read with --- src/vpk/Velopack.Packaging/Exe.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vpk/Velopack.Packaging/Exe.cs b/src/vpk/Velopack.Packaging/Exe.cs index c4e881f5..bb89a95b 100644 --- a/src/vpk/Velopack.Packaging/Exe.cs +++ b/src/vpk/Velopack.Packaging/Exe.cs @@ -133,6 +133,9 @@ public static class Exe process.Kill(); ct.ThrowIfCancellationRequested(); } + + // need to call this once more to wait for the streams to finish. if WaitForExit is called with a timeout, the streams will not be fully read. + process.WaitForExit(); return (process.ExitCode, sOut.ToString().Trim(), sErr.ToString().Trim()); }