Skip to content

Commit b496f94

Browse files
author
James Brundage
committed
Updating Core ParameterAttribute Transpiler (Fixes #223)
1 parent 02de798 commit b496f94

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Transpilers/Core/PipeScript.ParameterAttribute.psx.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
33
#>
44
[ValidateScript({
5-
$_.Parent -is [Management.Automation.Language.ParameterAst]
5+
if (-not $_.Parent -is [Management.Automation.Language.ParameterAst]) {
6+
return $false
7+
}
8+
9+
$isRealType = $_.TypeName.GetReflectionType()
10+
if ($isRealType) { return $false }
11+
return $true
612
})]
713
param(
814
[Parameter(Mandatory,ParameterSetName='ParameterAst',ValueFromPipeline)]

0 commit comments

Comments
 (0)