dfinke / NameIT

PowerShell module for randomly generating data
MIT License
131 stars 28 forks source link

`Invoke-Generate -CustomData` - `alias:\` Called Instead of `function:\` #51

Open mattcargile opened 1 year ago

mattcargile commented 1 year ago

Usage like ig -CustomData @{ pwd = 'a', 'B' } '[pwd]' returns the present working directory because there is an Alias with this name already. Maybe one could use execution like &( get-item function:\pwd) instead to insure we execute the function?

Below is the creation of the function.

https://github.com/dfinke/NameIT/blob/77f80de874adc658ae767cae64a56ef085792afa/Public/Invoke-Generate.ps1#L122

Maybe below is where we could change to use the get-item call reference?

https://github.com/dfinke/NameIT/blob/77f80de874adc658ae767cae64a56ef085792afa/Public/Invoke-Generate.ps1#L150