Добавлено закрытие приложения
This commit is contained in:
@@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade
|
|||||||
/// Обновление через внешний Updater.exe.
|
/// Обновление через внешний Updater.exe.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static async Task UpdateWithExternalAsync(
|
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
|
try
|
||||||
{
|
{
|
||||||
@@ -99,6 +99,8 @@ public static class ReleaseUpdaterFacade
|
|||||||
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory
|
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (exitCurrentApp) { Environment.Exit(0); }
|
||||||
|
|
||||||
process?.WaitForExit();
|
process?.WaitForExit();
|
||||||
|
|
||||||
if (process?.ExitCode == 0)
|
if (process?.ExitCode == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user