-
Notifications
You must be signed in to change notification settings - Fork 157
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
Pass environment as a hash to system or exec calls #841
Conversation
Passing the environment variables in front of the command does not work on every operating system, such as Windows
|
This seems to let
After that, the process keeps running until interrupted. I don't know if the failure to find the |
As far as I know, the When you try it with the extension, is there any output either in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This seems a bit cleaner anyway.
Merging this for now since it fixes the linked issue at least. |
Motivation
Closes #840
Passing the environment variables in front of the command does not work on every operating system, such as Windows. We should rely on Ruby to do the correct thing for each OS.
I believe that this PR with Shopify/vscode-ruby-lsp#712 will finally make the Ruby LSP work on Windows.
Implementation
The entire
exec
family accepts extra environment variables as a hash for the first argument. Just started using that instead of concatenating the variables as a string.Automated Tests
Changed the tests to reflect the new approach.