Skip to content

Commit

Permalink
Write to file async
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Apr 15, 2021
1 parent 944ab6f commit d5cd625
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/NetSparkle/SparkleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1342,7 +1342,7 @@ setlocal ENABLEDELAYEDEXPANSION
{relaunchAfterUpdate}
:afterinstall
endlocal";
write.Write(output);
await write.WriteAsync(output);
write.Close();
}
else
Expand Down Expand Up @@ -1374,7 +1374,7 @@ setlocal ENABLEDELAYEDEXPANSION
{waitForFinish}
{tarCommand}
{relaunchAfterUpdate}";
write.Write(output);
await write.WriteAsync(output);
}
else
{
Expand All @@ -1388,7 +1388,7 @@ setlocal ENABLEDELAYEDEXPANSION
{waitForFinish}
{installerCmd}
{relaunchAfterUpdate}";
write.Write(output);
await write.WriteAsync(output);
}
write.Close();
}
Expand Down

0 comments on commit d5cd625

Please # to comment.