Skip to content

Commit

Permalink
Fixed post-install update check not running
Browse files Browse the repository at this point in the history
(cherry picked from commit eea6be4)
  • Loading branch information
Taloth authored and Qstick committed Mar 15, 2021
1 parent ea3e523 commit ec8d1c4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/NzbDrone.Core/Update/InstallUpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,6 @@ public void Handle(ApplicationStartingEvent message)
// Check if we have to do an application update on startup
try
{
// Don't do a prestartup update check unless BuiltIn update is enabled
if (_configFileProvider.UpdateAutomatically ||
_configFileProvider.UpdateMechanism != UpdateMechanism.BuiltIn ||
_deploymentInfoProvider.IsExternalUpdateMechanism)
{
return;
}

var updateMarker = Path.Combine(_appFolderInfo.AppDataFolder, "update_required");
if (!_diskProvider.FileExists(updateMarker))
{
Expand All @@ -322,6 +314,15 @@ public void Handle(ApplicationStartingEvent message)

_logger.Debug("Post-install update check requested");

// Don't do a prestartup update check unless BuiltIn update is enabled
if (!_configFileProvider.UpdateAutomatically ||
_configFileProvider.UpdateMechanism != UpdateMechanism.BuiltIn ||
_deploymentInfoProvider.IsExternalUpdateMechanism)
{
_logger.Debug("Built-in updater disabled, skipping post-install update check");
return;
}

var latestAvailable = _checkUpdateService.AvailableUpdate();
if (latestAvailable == null)
{
Expand Down

0 comments on commit ec8d1c4

Please sign in to comment.