Skip to content

Commit 367b3ca

Browse files
committed
Fix test
1 parent 9614e3b commit 367b3ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Write-DscTrace {
1313
[string]$Message
1414
)
1515

16-
$trace = @{$Operation = $Message } | ConvertTo-Json -Compress
16+
$trace = @{$Operation.ToLower() = $Message } | ConvertTo-Json -Compress
1717
$host.ui.WriteErrorLine($trace)
1818
}
1919

@@ -412,7 +412,7 @@ function Invoke-DscOperation {
412412
'PowerShell version: ' + $psVersion | Write-DscTrace
413413

414414
# get details from cache about the DSC resource, if it exists
415-
$cachedDscResourceInfo = $dscResourceCache | Where-Object Type -EQ $DesiredState.type | ForEach-Object DscResourceInfo
415+
$cachedDscResourceInfo = $dscResourceCache | Where-Object Type -EQ $DesiredState.type | ForEach-Object DscResourceInfo | Select-Object -First 1
416416

417417
# if the resource is found in the cache, get the actual state
418418
if ($cachedDscResourceInfo) {
@@ -577,4 +577,4 @@ class DscResourceInfo {
577577
[string] $ImplementedAs
578578
[string] $CompanyName
579579
[System.Collections.Generic.List[DscResourcePropertyInfo]] $Properties
580-
}
580+
}

0 commit comments

Comments
 (0)