mirror of
https://github.com/PowerShell/PSDesiredStateConfiguration
synced 2026-06-21 13:45:25 +00:00
Update to v2.0.8 and backport two fixes (#130)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# v2 Changelog
|
||||
|
||||
## [v2.0.8]
|
||||
|
||||
- Fixed an issue with array parameters is key-value pairs (#128).
|
||||
- ConvertTo-MOFInstance: Include resource properties with empty array value (#127)
|
||||
|
||||
## [v2.0.7]
|
||||
|
||||
### Main changes
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
RootModule = 'PSDesiredStateConfiguration.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
moduleVersion = '2.0.7'
|
||||
moduleVersion = '2.0.8'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = @('Core')
|
||||
|
||||
@@ -509,7 +509,7 @@ function ConvertTo-MOFInstance
|
||||
$targetTypeName = $PropertyTypes[$p.Name].TypeConstraint
|
||||
|
||||
# see if the target type is an array
|
||||
$asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array'
|
||||
$asArray = $p.Name -eq 'DependsOn' -or $targetTypeName -match 'Array' -or ((-not [string]::IsNullOrEmpty($targetTypeName)) -and $targetTypeName.EndsWith('[]'))
|
||||
|
||||
# Convert the CIM typename to the appropriate .NET type to use
|
||||
# to convert the input object into an appropriately encoded string
|
||||
@@ -671,10 +671,7 @@ function ConvertTo-MOFInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($targetTypeName -notmatch 'Array' -or $p.Value.Count)
|
||||
{
|
||||
$p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
|
||||
}
|
||||
$p.Name + ' = ' + (stringify -value $p.Value -asArray $asArray -targetType $targetType ) + ";`n"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4211,7 +4208,7 @@ function GetResourceFromKeyword
|
||||
Ascending = $true
|
||||
}
|
||||
$resource.UpdateProperties($updatedProperties)
|
||||
|
||||
|
||||
$resource | Add-Member -MemberType NoteProperty -Name 'ImplementationDetail' -Value $implementationDetail
|
||||
|
||||
return $resource
|
||||
|
||||
Reference in New Issue
Block a user