mirror of
https://github.com/Readarr/Readarr
synced 2026-05-09 05:21:41 +02:00
Fixed post-install update check not running
(cherry picked from commit eea6be459d5dbfafb9a5285046282c25c4697242)
This commit is contained in:
parent
e791f22333
commit
6cb2bf6b5f
1 changed files with 9 additions and 8 deletions
|
|
@ -307,14 +307,6 @@ public void Handle(ApplicationStartingEvent message)
|
||||||
// Check if we have to do an application update on startup
|
// Check if we have to do an application update on startup
|
||||||
try
|
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");
|
var updateMarker = Path.Combine(_appFolderInfo.AppDataFolder, "update_required");
|
||||||
if (!_diskProvider.FileExists(updateMarker))
|
if (!_diskProvider.FileExists(updateMarker))
|
||||||
{
|
{
|
||||||
|
|
@ -323,6 +315,15 @@ public void Handle(ApplicationStartingEvent message)
|
||||||
|
|
||||||
_logger.Debug("Post-install update check requested");
|
_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();
|
var latestAvailable = _checkUpdateService.AvailableUpdate();
|
||||||
if (latestAvailable == null)
|
if (latestAvailable == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue