File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,19 +214,19 @@ function Build-Module {
214214 $ParseResult | MoveUsingStatements - Encoding " $ ( $ModuleInfo.Encoding ) "
215215
216216 if (-not $ModuleInfo.IgnoreAlias ) {
217- $AliasesToExport = ( $ParseResult | GetCommandAlias).Values.Where({ $null -ne $_ })
217+ $AliasesToExport = $ParseResult | GetCommandAlias
218218 }
219219
220220 # If there is a PublicFilter, update ExportedFunctions
221221 if ($ModuleInfo.PublicFilter ) {
222222 # SilentlyContinue because there don't *HAVE* to be public functions
223223 if (($PublicFunctions = Get-ChildItem $ModuleInfo.PublicFilter - Recurse - ErrorAction SilentlyContinue | Where-Object BaseName -in $AllScripts.BaseName | Select-Object - ExpandProperty BaseName)) {
224- Update-Metadata - Path $OutputManifest - PropertyName FunctionsToExport - Value ($PublicFunctions | Where-Object {$_ -notin $AliasesToExport })
224+ Update-Metadata - Path $OutputManifest - PropertyName FunctionsToExport - Value ($PublicFunctions | Where-Object {$_ -notin $AliasesToExport.Values })
225225 }
226226 }
227227
228228 if ($PublicFunctions -and -not $ModuleInfo.IgnoreAlias ) {
229- if (($AliasesToExport = $AliasesToExport | Where-Object { $_ -in $ PublicFunctions } | ForEach-Object { $_ } | Select-Object - Unique)) {
229+ if (($AliasesToExport = $AliasesToExport [ $ PublicFunctions] | ForEach-Object { $_ } | Select-Object - Unique)) {
230230 Update-Metadata - Path $OutputManifest - PropertyName AliasesToExport - Value $AliasesToExport
231231 }
232232 }
You can’t perform that action at this time.
0 commit comments