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

Add null check for $host.UI and its properties to avoid race condition (#2383) #2468

Merged
merged 1 commit into from
May 20, 2024

Conversation

kborowinski
Copy link
Contributor

@kborowinski kborowinski commented May 18, 2024

PR Summary

Added null check for $host.UI and $host.UI.properties to avoid race condition in PowerShell when accessing the properties from multiple threads.

Fixes #2383.

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)

Copy link
Collaborator

@fflaten fflaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙌 LGTM

@fflaten
Copy link
Collaborator

fflaten commented May 18, 2024

@nohwnd Maybe include this in 5.6.0 also?

@nohwnd nohwnd merged commit 70b5be0 into pester:main May 20, 2024
11 checks passed
@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

/backport rel/5.6.x

@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

/backport to rel/5.6.x

3 similar comments
@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

/backport to rel/5.6.x

@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

/backport to rel/5.6.x

@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

/backport to rel/5.6.x

Copy link

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

@nohwnd
Copy link
Member

nohwnd commented May 20, 2024

sorry for the spam, I was trying to configure the backport bot.

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.

Pester throws an exception when run inside runspace
3 participants