Skip to content

Commit ef53765

Browse files
author
James Brundage
committed
Updating PipeScript.ps1.psm1 to use ModuleExports (#104)
1 parent 288a04b commit ef53765

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

PipeScript.ps1.psm1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ foreach ($transpilerCmd in Get-Transpiler) {
99
}
1010

1111
$MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
12-
foreach ($cmd in $ExecutionContext.SessionState.InvokeCommand.GetCommands('*','Function', $true)) {
13-
if ($cmd.ScriptBlock.Module -ne $MyModule) { continue }
14-
if ($cmd.ScriptBlock.Attributes.AliasNames) {
15-
$aliasNames += $cmd.ScriptBlock.Attributes.AliasNames
16-
}
17-
}
12+
$aliasNames += [GetExports("Alias")]$MyModule
1813

1914
Export-ModuleMember -Function * -Alias $aliasNames

0 commit comments

Comments
 (0)