Fixed: Don't block updates under docker unless configured in package_info

(cherry picked from commit 5a7e34e291c2715aa67161e5c455d25e80f498df)

Closes #2772
This commit is contained in:
Mark McDowall
2023-08-08 17:35:13 -07:00
committed by Bogdan
parent ed9af393b7
commit 82bc2d1aa4
2 changed files with 28 additions and 17 deletions
@@ -238,18 +238,18 @@ namespace NzbDrone.Core.Update
return null;
}
if (_osInfo.IsDocker)
{
_logger.ProgressDebug("Updating is disabled inside a docker container. Please update the container image.");
return null;
}
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && updateTrigger != CommandTrigger.Manual)
{
_logger.ProgressDebug("Auto-update not enabled, not installing available update.");
return null;
}
if (_configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn && _deploymentInfoProvider.PackageUpdateMechanism == UpdateMechanism.Docker)
{
_logger.ProgressDebug("Built-In updater disabled inside a docker container. Please update the container image.");
return null;
}
// Safety net, ConfigureUpdateMechanism should take care of invalid settings
if (_configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn && _deploymentInfoProvider.IsExternalUpdateMechanism)
{