Skip to content

Commit

Permalink
Fix Pester test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsreyn committed Oct 26, 2024
1 parent 6f547da commit 242a1a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions powershell-adapter/psDscAdapter/psDscAdapter.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,12 @@ function Invoke-DscOperation {
$addToActualState.properties = [psobject]@{'InDesiredState'=$Result}
}
'Export' {
$t = $dscResourceInstance.GetType()
$methods = $t.GetMethods() | Where-Object { $_.Name -eq 'Export' }
$method = foreach ($m in $methods) {
if ($m.GetParameters().Count -eq 0) {
$m
break
$method = foreach ($mt in $methods) {
if ($mt.GetParameters().Count -eq 0) {
$mt
break
}
}

Expand Down

0 comments on commit 242a1a0

Please sign in to comment.