Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate key exception in Should-InvokeInternal debug logging #2130

Merged
merged 2 commits into from Mar 6, 2022

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented Feb 6, 2022

PR Summary

When Debug.WriteDebugMessages is enabled, providing a parameter filter to Should -Invoke referencing an existing variable multiple times will cause a dict key already exist exception. This PR adds a check to avoid adding the same conflicting variable twice.

Fix #2123

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@nohwnd
Copy link
Member

nohwnd commented Mar 6, 2022

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@nohwnd nohwnd merged commit 459295b into pester:main Mar 6, 2022
@fflaten fflaten deleted the fix-preexistingdebug branch March 6, 2022 23:56
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.

Debug.WriteDebugMessages Can Cause Dictionary Key Errors
2 participants