Skip to content

Commit b888b7e

Browse files
committed
Fix for command types on pwsh
1 parent 81f8c4e commit b888b7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/PSFTests/general/Help.Tests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ if ($SkipTest) { return }
4848
. $ExceptionsFile
4949

5050
$includedNames = (Get-ChildItem $CommandPath -Recurse -File | Where-Object Name -like "*.ps1").BaseName
51-
$commands = Get-Command -Module (Get-Module $ModuleName) -CommandType Cmdlet, Function, Workflow | Where-Object Name -in $includedNames
51+
$commandTypes = @('Cmdlet', 'Function')
52+
if ($PSVersionTable.PSEdition -eq 'Desktop' ) { $commandTypes += 'Workflow' }
53+
$commands = Get-Command -Module (Get-Module $ModuleName) -CommandType $commandTypes | Where-Object Name -In $includedNames
5254

5355
## When testing help, remember that help is cached at the beginning of each session.
5456
## To test, restart session.

0 commit comments

Comments
 (0)