Skip to content

Create $psEditor as a constant #1647

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
Dec 17, 2021
Merged

Conversation

andyleejordan
Copy link
Member

This prevents accidental removal (and breakage of the extension) by disallowing Remove-Variable from removing $psEditor. While it's not expected anyone would do this, glob expressions may include the variable name and when piped to Remove-Variable resulted in a user-reported breakage.

Fixes PowerShell/vscode-powershell#3718.

This prevents accidental removal (and breakage of the extension) by
disallowing `Remove-Variable` from removing `$psEditor`. While it's not
expected anyone would do this, glob expressions may include the variable
name and when piped to `Remove-Variable` resulted in a user-reported
breakage.
@andyleejordan andyleejordan merged commit f1c4ae5 into master Dec 17, 2021
@andyleejordan andyleejordan deleted the andschwa/constant-psEditor branch December 17, 2021 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Engine Issue-Bug A bug to squash.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove-Variable can cause cls and Clear-Host to throw You cannot call a method on a null-valued expression.
2 participants