Sitelet https://github.com/PowerShell/PowerShell/pull/3149
Skip to content

Fix PSModuleInfo.CaptureLocals to not do ValidateAttribute check when capturing variables from the caller's scope - #3149

Merged
Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:fix-GetNewClosure
Feb 17, 2017
Merged

Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:fix-GetNewClosure

Conversation

@daxian-dbw

Copy link
Copy Markdown
Member

fix #3144

… capturing variables from the caller's scope
@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Feb 16, 2017
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Feb 16, 2017 •

Copy link
Copy Markdown
Member Author

I added a comment in test per requested by Dan Travison (@dantraMSFT). Nothing is changed in code/script.

@lzybkr Jason Shirk (lzybkr) self-assigned this Feb 16, 2017
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 5a8fa57 into PowerShell:master Feb 17, 2017
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the fix-GetNewClosure branch February 17, 2017 05:25
@iSazonov Ilya (iSazonov) removed the Review - Needed The PR is being reviewed label Mar 27, 2017
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
… capturing variables from the caller's scope (PowerShell#3149)

Fix PSModuleInfo.CaptureLocals to not do ValidateAttribute check when capturing variables from the caller's scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScriptBlock.GetNewClosure() unexpectedly tries to include unbound parameters that have validation attributes, causing errors

6 participants