Skip to content

Commit 242a1a0

Browse files
committed
Fix Pester test
1 parent 6f547da commit 242a1a0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,12 @@ function Invoke-DscOperation {
484484
$addToActualState.properties = [psobject]@{'InDesiredState'=$Result}
485485
}
486486
'Export' {
487+
$t = $dscResourceInstance.GetType()
487488
$methods = $t.GetMethods() | Where-Object { $_.Name -eq 'Export' }
488-
$method = foreach ($m in $methods) {
489-
if ($m.GetParameters().Count -eq 0) {
490-
$m
491-
break
489+
$method = foreach ($mt in $methods) {
490+
if ($mt.GetParameters().Count -eq 0) {
491+
$mt
492+
break
492493
}
493494
}
494495

0 commit comments

Comments
 (0)