Revert "Never load a module targeting the PSReadLine module's `SessionState`" by daxian-dbw · Pull Request #25792 · PowerShell/PowerShell

@daxian-dbw

…nState` …"

This reverts commit 1b03005.

SeeminglyScience

@daxian-dbw daxian-dbw added the CL-General

Indicates that a PR should be marked as a general cmdlet change in the Change Log

label

Jul 29, 2025

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

Aug 12, 2025
…nState`" (PowerShell#25792)

The change causes nested modules of PSReadLine to be loaded to global session state as well.

It's possible to check if we are currently importing the PSReadLine module but the check would depend on the current design of the PSReadLine module, such as how many nested modules it has, its module type, and etc., which is fragile. It's safer to just revert the change.

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

Dec 12, 2025
…nState`" (PowerShell#25792)

The change causes nested modules of PSReadLine to be loaded to global session state as well.

It's possible to check if we are currently importing the PSReadLine module but the check would depend on the current design of the PSReadLine module, such as how many nested modules it has, its module type, and etc., which is fragile. It's safer to just revert the change.