Skip to content

Commit b21b1fd

Browse files
author
James Brundage
committed
Updating [Include] - Not including Source Generators (#96)
1 parent 243632f commit b21b1fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Transpilers/Include.psx.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ if ($psCmdlet.ParameterSetName -eq 'ScriptBlock' -or
130130
} elseif ($VariableAst.VariablePath -notmatch '^null$') {
131131
[ScriptBlock]::Create(@"
132132
foreach (`$file in (Get-ChildItem -Path "$($VariableAst)" -Filter "$FilePath" -Recurse)) {
133-
if (`$file.Extension -ne '.ps1') { continue }
133+
if (`$file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1
134+
if (`$file.Name -match '\.ps1\.ps1$') { continue } # Skip if the file is a source generator.
134135
. `$file.FullName
135-
}
136+
}
136137
"@)
137138
}

0 commit comments

Comments
 (0)