diff --git a/ReleaseUpdater/ReleaseUpdaterFacade.cs b/ReleaseUpdater/ReleaseUpdaterFacade.cs index 9544b1b..2701bab 100644 --- a/ReleaseUpdater/ReleaseUpdaterFacade.cs +++ b/ReleaseUpdater/ReleaseUpdaterFacade.cs @@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade /// Обновление через внешний Updater.exe. /// public static async Task UpdateWithExternalAsync( - string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest", string? updaterExePath = null) + string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest", string? updaterExePath = null, bool exitCurrentApp = false) { try { @@ -99,6 +99,8 @@ public static class ReleaseUpdaterFacade WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory }); + if (exitCurrentApp) { Environment.Exit(0); } + process?.WaitForExit(); if (process?.ExitCode == 0)