pester / Pester

Pester is the ubiquitous test and mock framework for PowerShell.
https://pester.dev/
Other
3.07k stars 469 forks source link

Fix NRE in mock debug log for native commands #2480

Closed fflaten closed 3 months ago

fflaten commented 3 months ago

PR Summary

Fixes NRE using mock debug logging when Should-Invoke with -ParameterFilter is used for a mocked native application. Caused by variable conflict-logging looking for CommandMetaData which doesn't exist for external commands = N/A logging.

Fix #2479

Backport to 5.6.0

PR Checklist

fflaten commented 3 months ago

While at it, let's save AST-processing for parameter-less functions as well.

fflaten commented 3 months ago

/backport to rel/5.6.x

github-actions[bot] commented 3 months ago

Started backporting to rel/5.6.x: https://github.com/pester/Pester/actions/runs/9177190930

nohwnd commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).