Skip to content

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

@mattcargile

Description

@mattcargile

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.

$null = New-Item -Path Function: -Name $key -Value { $CustomData[$MyInvocation.InvocationName] | Get-Random } -Force

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

$generatorExpression = "$fn $arguments"

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions