Skip to content

Commit 2ffe81d

Browse files
committed
Changed dot sourcing back to $PSItem.FullName. The io.file method strips AST and breaks Pester's code coverage.
1 parent ce50008 commit 2ffe81d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PoshServiceNow/PoshServiceNow.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ foreach($Folder in @('Private', 'Public'))
1515

1616
# dot source each file
1717
$Files | Where-Object{ $_.name -NotLike '*.Tests.ps1'} |
18-
ForEach-Object {Write-Verbose $_.basename; . ([scriptblock]::Create([io.file]::ReadAllText($PSItem.FullName)))}
18+
ForEach-Object {Write-Verbose $_.basename; . $PSItem.FullName}
1919
}
2020
}
2121

0 commit comments

Comments
 (0)