PoshCode / ModuleBuilder

A PowerShell Module to help scripters write, version, sign, package, and publish.
MIT License
445 stars 54 forks source link

Automatic alias exports fail when there's more than one on a function #84

Closed Jaykul closed 4 years ago

Jaykul commented 4 years ago

When I have a public function like:

function Set-Source {
    [CmdletBinding()]
    [Alias("ss", "ssou")]
    param()
}

Unless it's the only function that's exporting aliases, it breaks the module manifest. It outputs the aliases for that command as "System.String[]" which not only doesn't export the alias, but interferes with PowerShell parsing the manifest properly (because [] is seen as an invalid wildcard range), so the module won't import and Get-Module -ListAvailable reports partial information about it.

Jaykul commented 4 years ago

This was fixed in #85