PSArm icon indicating copy to clipboard operation
PSArm copied to clipboard

Give PSArm block an alias-free environment so property keywords work

Open rjmholt opened this issue 3 years ago • 1 comments

Fixes https://github.com/PowerShell/PSArm/issues/126.

In this PR, we use internal PowerShell engine APIs to tear down the aliases in each parent scope and store them while the Arm block body is executed. When execution is complete, we then restore the alias definitions to each scope using other internal PowerShell engine APIs.

rjmholt avatar Mar 31 '21 20:03 rjmholt

The changes look fine, but can you please add more context information in the PR description about why an alias-free environment is needed? The referenced issue doesn't have the related context information either.

I've updated the issue to describe the problem and the PR to describe the solution (the solution description not as detailed).

rjmholt avatar Apr 12 '21 21:04 rjmholt