fix(vscode-web): write settings to User path instead of Machine#664
Open
blinkagent[bot] wants to merge 2 commits intomainfrom
Open
fix(vscode-web): write settings to User path instead of Machine#664blinkagent[bot] wants to merge 2 commits intomainfrom
blinkagent[bot] wants to merge 2 commits intomainfrom
Conversation
This changes the settings file location from: ~/.vscode-server/data/Machine/settings.json to: ~/.vscode-server/data/User/settings.json User Remote settings have higher precedence than User Local settings, ensuring module-provided settings properly override the users local machine settings. Previously, Machine settings could be overridden by User Remote settings, preventing the module from applying its configuration. VS Code settings precedence (lowest to highest): 1. Default 2. User Local 3. User Remote 4. Workspace 5. Workspace Folder
Member
|
@DevelopmentCats can you help test this for #447. Thanks. |
Contributor
|
I will test this and make sure this works properly and we can get it merged |
Member
any updates here @DevelopmentCats ? |
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.
Summary
This changes the settings file location from:
~/.vscode-server/data/Machine/settings.jsonto:
~/.vscode-server/data/User/settings.jsonProblem
The module was writing custom settings to the Machine settings path, which has lower precedence than User Remote settings. This meant that if a user had any User settings on the remote, they would override the module-provided settings.
Solution
Write settings to the User Remote path instead. This ensures module-provided settings properly override the user's local machine settings while still allowing Workspace settings to take precedence if needed.
VS Code Settings Precedence (lowest to highest)
~/.config/Code/User/settings.json(local machine)~/.vscode-server/data/User/settings.json✅{project}/.vscode/settings.json{folder}/.vscode/settings.jsonSource: VS Code merges settings in
configurationModels.ts#L1021-L1026, with User Remote overriding User Local inconfigurationModels.ts#L962-L972.Testing
Added tests that: