Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/Public/Invoke-ScriptGenerator.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ function Invoke-ScriptGenerator {
}

# Find that generator...
$GeneratorCmd = Get-Command -Name ${Generator} -ParameterType Ast -ErrorAction Ignore <# -CommandType Function #>
| Where-Object { $_.OutputType.Name -eq "TextReplacement" -or ($_.CommandType -eq "Alias" -and $_.Definition -like "PesterMock*" ) }
| Select-Object -First 1
$GeneratorCmd = Get-Command -Name ${Generator} -ParameterType Ast -ErrorAction Ignore <# -CommandType Function #> |
Where-Object { $_.OutputType.Name -eq "TextReplacement" -or ($_.CommandType -eq "Alias" -and $_.Definition -like "PesterMock*" ) } |
Select-Object -First 1

if (-not $GeneratorCmd) {
Write-Error "Generator missconfiguration. Unable to find Generator = '$Generator'"
Expand Down