Let the server determine cwd on its own#1977
Open
wagenet wants to merge 1 commit intomicrosoft:mainfrom
Open
Conversation
Member
|
This is for security reasons not so easy. I need to think about the consequences of this and if trusted workspace allow this now. Using the extension host's CWD ensures that no unwanted binary code is loaded. |
Member
|
What we can always do is to have a opt-in setting for this which we should consider anyways since the change might be a surprise for others. |
Author
|
@dbaeumer opt-in is ok for me. My goal is very much for the process to run in the context of my workspace. |
Author
|
@dbaeumer do you have any guidance on how to implement this? I'd still love to see this happen but my understanding of the codebase is pretty limited. |
Member
|
Here are some pointers:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1727
If
cwdis not specified in theServerOptionsthen the Language Server will use its own logic to determine the correct working directory, including the root of the workspace. This then allowseslint.runtimeto be set to"node"which will be run in the root of the workspace. For projects using tools like Volta, this leads to it using the Volta-specified node version as expected.