Should exit right away after restarting for updates

This commit is contained in:
Caelan Sayler
2024-01-31 16:49:28 +00:00
parent 091f6dcb92
commit 8c27d9b348

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.Versioning; using System.Runtime.Versioning;
@@ -214,6 +214,7 @@ namespace Velopack
if (!restarted && _autoApply) { if (!restarted && _autoApply) {
log.Info("Auto apply is true, so restarting to apply update..."); log.Info("Auto apply is true, so restarting to apply update...");
UpdateExe.Apply(locator, true, true, args, log); UpdateExe.Apply(locator, true, true, args, log);
Exit(0);
} else { } else {
log.Info("Pre-condition failed, we will not restart to apply updates. (restarted: " + restarted + ", autoApply: " + _autoApply + ")"); log.Info("Pre-condition failed, we will not restart to apply updates. (restarted: " + restarted + ", autoApply: " + _autoApply + ")");
} }