Skip to content

Exhibit showing PowerShell closures misbehave with function name resolution.

Notifications You must be signed in to change notification settings

lmmarsano/powershell-closure-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PowerShell Closure Function Name Resolution Issue

Exhibit showing PowerShell closures misbehave with function name resolution. PowerShell raises CommandNotFoundException over a defined function called from a closure. Raised and explained in pester/Pester#525.

Test Conditions

Tested on Windows 10 with Pester. The same issue is likely found in all PowerShell versions with the ScriptBlock GetNewClosure method.

Installation

Clone the repository and run Pester.

Usage

  1. Set-Location to the cloned repository.
  2. Invoke-Pester

About

Exhibit showing PowerShell closures misbehave with function name resolution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published