Skip to content

Commit b9ab293

Browse files
StartAutomatingStartAutomating
authored andcommitted
Updating Search-PipeScript (fixing match condition) (#115)
1 parent 23abcb0 commit b9ab293

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Search-PipeScript.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function Search-PipeScript {
151151
elseif ($astType -is [Regex]) {
152152
[scriptblock]::Create((
153153
'param($ast)
154-
$ast.GetType().Name -match ([Regex]::New(' +
154+
$ast.GetType().Name -match ([Regex]::New(' +
155155
$astType.ToString().Replace("'", "''") + "','" +
156156
$astType.Options + "','" +
157157
$(if ($AstType.MatchTimeout -lt 0) {
@@ -161,8 +161,8 @@ function Search-PipeScript {
161161
}) + '))'
162162
))
163163
}
164-
elseif ($astType -as [regex]) {
165-
[ScriptBlock]::Create('param($ast) $ast.GetType().Name -match ' + $astType +'')
164+
elseif ($astType -as [regex]) {
165+
[ScriptBlock]::Create('param($ast) $ast.GetType().Name -match "'+ $astType +'"')
166166
} else {
167167
[ScriptBlock]::Create('param($ast) $ast.GetType().Name -like "*' + $astType +'*"')
168168
}

0 commit comments

Comments
 (0)