Добавлено закрытие приложения
All checks were successful
CI / build-test (push) Successful in 25s
Release / pack-and-publish (release) Successful in 25s

This commit is contained in:
2025-11-25 09:34:10 +03:00
parent 6a01813602
commit d4977a8708

View File

@@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade
/// Обновление через внешний Updater.exe.
/// </summary>
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)