mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Automation/Integration/Unit Tests
This commit is contained in:
@@ -32,6 +32,7 @@ namespace NzbDrone.Core.Update
|
||||
private readonly IConfigFileProvider _configFileProvider;
|
||||
private readonly IRuntimeInfo _runtimeInfo;
|
||||
private readonly IBackupService _backupService;
|
||||
private readonly IOsInfo _osInfo;
|
||||
|
||||
|
||||
public InstallUpdateService(ICheckUpdateService checkUpdateService,
|
||||
@@ -46,6 +47,7 @@ namespace NzbDrone.Core.Update
|
||||
IConfigFileProvider configFileProvider,
|
||||
IRuntimeInfo runtimeInfo,
|
||||
IBackupService backupService,
|
||||
IOsInfo osInfo,
|
||||
Logger logger)
|
||||
{
|
||||
if (configFileProvider == null)
|
||||
@@ -64,6 +66,7 @@ namespace NzbDrone.Core.Update
|
||||
_configFileProvider = configFileProvider;
|
||||
_runtimeInfo = runtimeInfo;
|
||||
_backupService = backupService;
|
||||
_osInfo = osInfo;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -209,6 +212,11 @@ namespace NzbDrone.Core.Update
|
||||
return;
|
||||
}
|
||||
|
||||
if (_osInfo.IsDocker)
|
||||
{
|
||||
throw new CommandFailedException("Updating is disabled inside a docker container. Please update the container image.");
|
||||
}
|
||||
|
||||
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && message.Trigger != CommandTrigger.Manual)
|
||||
{
|
||||
_logger.ProgressDebug("Auto-update not enabled, not installing available update.");
|
||||
|
Reference in New Issue
Block a user