Skip to content

Don't send empty environment vars when not Windows PowerShell dev build #444

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
Jan 19, 2017

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jan 19, 2017

This change fixes an issue where $env:PROCESSOR_ARCHITECTURE is not being
set properly in the language server's powershell.exe process which caused
an exception when gathering that variable. The problem was caused by the
environment variable setting behavior when the Windows PowerShell
developer build setting is set to false. In this case, an empty
environment variable object was being passed to the process, effectively
clearing its environment variables.

This is one half of the fix to PowerShell/PowerShellEditorServices#346.

This change fixes an issue where $env:PROCESSOR_ARCHITECTURE is not being
set properly in the language server's powershell.exe process which caused
an exception when gathering that variable.  The problem was caused by the
environment variable setting behavior when the Windows PowerShell
developer build setting is set to false.  In this case, an empty
environment variable object was being passed to the process, effectively
clearing its environment variables.

This is one half of the fix to PowerShell/PowerShellEditorServices#346.
@daviwil daviwil added this to the 0.9.0 milestone Jan 19, 2017
@daviwil daviwil merged commit 2f7ee91 into master Jan 19, 2017
@daviwil daviwil deleted the daviwil/fix-pses-346 branch January 19, 2017 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants