PoshCode / ModuleBuilder

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

Do not expect aliases to have a public file #115

Closed johlju closed 2 years ago

johlju commented 2 years ago

With this change I'm getting that GetAliasCommand returns private function aliases. Not sure how we prevent that? Suggestions?

Jaykul commented 2 years ago

Well, the old functionality only exported aliases if they pointed at public functions.

Now we can't do that, because the aliases you're trying to add point at ... other things (files, external functions, whatever).

Jaykul commented 2 years ago

Basically, I think we have to either:

  1. Export any aliases, regardless of what they point at ...
  2. Remove aliases that point at private functions (rather than filtering ones that don't point at public functions)

I'm leaning toward the first, meaning we just say: don't make aliases to private functions if you don't want them exported 😉

johlju commented 2 years ago

Yes I'm good with the first. It could be improved upon later on if that will be a big issue. 🤔