Skip to content

Commit 37a4aee

Browse files
Fix autoloader syntax (no pipeline)
1 parent fd07273 commit 37a4aee

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

NicolasAigner.SystemToolkit.psm1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# Auto‑loader: importa todas as funções do subdiretório Functions
2-
Get-ChildItem -Path (Join-Path $PSScriptRoot 'Functions') -Filter '*.ps1' |
3-
ForEach-Object {
4-
. $_.FullName
5-
Export-ModuleMember -Function $_.BaseName
6-
}
1+
# ---------- NicolasAigner.SystemToolkit.psm1 ----------
2+
# Carrega todas as funções do subdiretório Functions
3+
$funcFiles = Get-ChildItem -Path (Join-Path $PSScriptRoot 'Functions') -Filter '*.ps1'
4+
5+
foreach ($file in $funcFiles) {
6+
. $file.FullName
7+
}
8+
9+
# Exporta todas as funções carregadas
10+
Export-ModuleMember -Function $funcFiles.BaseName

0 commit comments

Comments
 (0)