From d5cd625c2efbb01e87f0f9a90a2b65516809ffb6 Mon Sep 17 00:00:00 2001 From: Deadpikle Date: Wed, 14 Apr 2021 21:07:43 -0400 Subject: [PATCH] Write to file async #187 --- src/NetSparkle/SparkleUpdater.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NetSparkle/SparkleUpdater.cs b/src/NetSparkle/SparkleUpdater.cs index 13bb5144..2d5db514 100644 --- a/src/NetSparkle/SparkleUpdater.cs +++ b/src/NetSparkle/SparkleUpdater.cs @@ -1311,7 +1311,7 @@ protected virtual async Task RunDownloadedInstaller(string downloadFilePath) { if (isWindows) { - write.WriteLine("@echo off"); + await write.WriteLineAsync("@echo off"); // We should wait until the host process has died before starting the installer. // This way, any DLLs or other items can be replaced properly. // Code from: http://stackoverflow.com/a/22559462/3938401 @@ -1342,7 +1342,7 @@ setlocal ENABLEDELAYEDEXPANSION {relaunchAfterUpdate} :afterinstall endlocal"; - write.Write(output); + await write.WriteAsync(output); write.Close(); } else @@ -1374,7 +1374,7 @@ setlocal ENABLEDELAYEDEXPANSION {waitForFinish} {tarCommand} {relaunchAfterUpdate}"; - write.Write(output); + await write.WriteAsync(output); } else { @@ -1388,7 +1388,7 @@ setlocal ENABLEDELAYEDEXPANSION {waitForFinish} {installerCmd} {relaunchAfterUpdate}"; - write.Write(output); + await write.WriteAsync(output); } write.Close(); }