Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Improve documentation around Parameter values not accessible in Test and Set #67

Open
cdhunt opened this issue Sep 28, 2020 · 0 comments

Comments

@cdhunt
Copy link

cdhunt commented Sep 28, 2020

Sample code: https://gist.github.com/cdhunt/80984dea7c6e45f42badf6c7f7f7bd8f

I've tried .GetNewClosure() on the Test and Set block as described in the Readme and $Name is always $null.

However, adding .GetNewClosure() on the New-RequirementGroup scriptblock did create a correctly scoped closure.

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant