Requirements
Requirements copied to clipboard
Improve documentation around Parameter values not accessible in Test and Set
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