Skip to content

Commit

Permalink
Fixed null minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
DorBreger committed Dec 21, 2024
1 parent d969032 commit 58040b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ function Set-TargetResource

<#
.SYNOPSIS
Tests if the SQL Server features are installed on the node.
Tests if the SQL Server Features are installed on the node.
.PARAMETER Action
The action to be performed. Default value is 'Install'.
Expand Down Expand Up @@ -2301,7 +2301,7 @@ function Test-TargetResource

[Parameter()]
[System.String]
$sqlMinorVersion
$SqlMinorVersion
)

if ($Action -eq 'Upgrade' -and $PSBoundParameters.ContainsKey('SqlVersion'))
Expand Down Expand Up @@ -2406,11 +2406,10 @@ function Test-TargetResource
{
$latestCU = Find-SqlDscLatestCu -MediaPath $UpdateSource -MajorVersion $installerSqlVersion
$updateSourceLatestMinor = Get-FilePathMinorVersion -Path $latestCU
if ($updateSourceLatestMinor -gt $sqlMinorVersion)
if ($updateSourceLatestMinor -gt $getTargetResourceResult.SqlMinorVersion)
{
Write-Verbose -Message (
$script:localizedData.DifferentMinorVersion -f $InstanceName, $sqlMinorVersion, $updateSourceLatestMinor
)
$script:localizedData.DifferentMinorVersion -f $InstanceName, $getTargetResourceResult.SqlMinorVersion, $updateSourceLatestMinor)
$result = $false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ ConvertFrom-StringData @'
FeatureAlreadyInstalled = The feature '{0}' is already installed so it will not be installed again.
FeatureFlag = Using feature flag '{0}'
DifferentMajorVersion = The instance '{0}' has the wrong major version. The major version is '{1}', but expected version '{2}'.
DifferentMinorVersion = The instance '{0} has the wrong minor version. The minor version is '{1}', but expected version '{2}'.
ParameterSqlVersionNotAllowedForSetupActionUpgrade = The parameter SqlVersion is not allowed to be specified when using the setup action Upgrade.
'@

0 comments on commit 58040b9

Please sign in to comment.