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

Conversation

@daxian-dbw
Copy link
Member

Reverts #24909

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.

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

@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
@daxian-dbw

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@TravisEz13
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@daxian-dbw daxian-dbw merged commit b801027 into master Jul 29, 2025
37 of 40 checks passed
@daxian-dbw daxian-dbw deleted the revert-24909-psrl branch July 29, 2025 21:32
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Jul 29, 2025

📣 Hey @@daxian-dbw, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants