◐ Shell
clean mode source ↗

Remove eager initialization of `_startupScripts` to enable lazy thread-safe initialization by xtqqczze · Pull Request #25767 · PowerShell/PowerShell

…d-safe initialization

The field `_startupScripts` was being initialized at declaration, which prevented the
`Interlocked.CompareExchange` logic in the `StartupScripts` property from ever executing.
This change removes the eager initialization to allow proper lazy and thread-safe setup
of the HashSet when the property is first accessed.

iSazonov

Copilot AI review requested due to automatic review settings

May 6, 2026 21:12

daxian-dbw

JustinGrote pushed a commit to JustinGrote/PowerShell that referenced this pull request

Jun 2, 2026