mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Fixed: Don't throw error on Docker Update Attempt (#725)
This commit is contained in:
parent
ec780c310c
commit
d81b063388
2 changed files with 7 additions and 5 deletions
|
@ -91,10 +91,11 @@ namespace NzbDrone.Core.Test.UpdateTests
|
||||||
public void should_not_update_if_inside_docker()
|
public void should_not_update_if_inside_docker()
|
||||||
{
|
{
|
||||||
Mocker.GetMock<IOsInfo>().Setup(x => x.IsDocker).Returns(true);
|
Mocker.GetMock<IOsInfo>().Setup(x => x.IsDocker).Returns(true);
|
||||||
|
|
||||||
Subject.Invoking(x => x.Execute(new ApplicationUpdateCommand()))
|
Subject.Execute(new ApplicationUpdateCommand());
|
||||||
.ShouldThrow<CommandFailedException>()
|
|
||||||
.WithMessage("Updating is disabled inside a docker container. Please update the container image.");
|
Mocker.GetMock<IProcessProvider>()
|
||||||
|
.Verify(c => c.Start(It.IsAny<string>(), It.Is<string>(s => s.StartsWith("12")), null, null, null), Times.Never());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -209,7 +209,8 @@ namespace NzbDrone.Core.Update
|
||||||
|
|
||||||
if (_osInfo.IsDocker)
|
if (_osInfo.IsDocker)
|
||||||
{
|
{
|
||||||
throw new CommandFailedException("Updating is disabled inside a docker container. Please update the container image.");
|
_logger.ProgressDebug("Updating is disabled inside a docker container. Please update the container image.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && message.Trigger != CommandTrigger.Manual)
|
if (OsInfo.IsNotWindows && !_configFileProvider.UpdateAutomatically && message.Trigger != CommandTrigger.Manual)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue