Skip to content

Fix creation of InitialSessionState to use CreateDefault2() #1547

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

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

andyleejordan
Copy link
Member

We erroneously changed our code to use CreateDefault instead of CreateDefault2. There existed old but defunct code for testing the use of CreateDefault instead, but it was never intentionally moved into production. The latter function loads only Microsoft.PowerShell.Core, leaving us to load the exact modules we intend to load ourselves, which is the safer behavior (and the previous behavior).

@andyleejordan
Copy link
Member Author

FYI @dkattan. I accidentally changed this when shepherding in #1526

We erroneously changed our code to use `CreateDefault()` instead of
`CreateDefault2()`. There existed old but defunct code for testing the
use of `CreateDefault()` instead, but it was never intentionally moved
into production. The latter function loads only
`Microsoft.PowerShell.Core`, leaving us to load the exact modules we
intend to load ourselves, which is the safer behavior (and the previous
behavior).
@andyleejordan andyleejordan force-pushed the andschwa/createdefault2 branch from 68fe561 to c014631 Compare August 18, 2021 23:13
@andyleejordan andyleejordan enabled auto-merge (squash) August 18, 2021 23:13
@andyleejordan andyleejordan merged commit 69a0b04 into master Aug 18, 2021
@andyleejordan andyleejordan deleted the andschwa/createdefault2 branch August 18, 2021 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants