mono version check will support 3 digit versions
This commit is contained in:
parent
088028b426
commit
7445adb455
|
@ -62,5 +62,21 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
|
||||
Subject.Check().Should().BeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_null_when_mono_3_2_7()
|
||||
{
|
||||
GivenOutput("3.2.7");
|
||||
|
||||
Subject.Check().Should().BeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_null_when_mono_3_2_1()
|
||||
{
|
||||
GivenOutput("3.2.1");
|
||||
|
||||
Subject.Check().Should().BeNull();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
{
|
||||
private readonly IProcessProvider _processProvider;
|
||||
private readonly Logger _logger;
|
||||
private static readonly Regex VersionRegex = new Regex(@"(?<=\W)(?<version>\d+\.\d+\.\d+\.\d+)(?=\W)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex VersionRegex = new Regex(@"(?<=\W)(?<version>\d+\.\d+\.\d+(\.\d+)?)(?=\W)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public MonoVersionCheck(IProcessProvider processProvider, Logger logger)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue