Update package.json#4120
Open
i10416 wants to merge 2 commits into
Open
Conversation
Related to - Shopify#4119 - Shopify#4114
Author
|
Just signed CLA |
Author
|
BTW, this is never ruby-lsp/vscode/src/ruby/custom.ts Line 26 in 4c109e3 microsoft/vscode#123957 (comment) It must use inspect method to detect null value. |
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.
Motivation
With capabilities.untrustedWorkspaces.restrictedConfigurations, it seems impossible to set customRubyCommand at workspace level because VS Code prevents the extension from reading the machine scope options in workspace's .vscode/settings.json.
It fails with
Automatic Ruby environment activation with custom failed: Command failed: && ruby -EUTF-8:UTF-8 '/path/to/.vscode/extensions/shopify.ruby-lsp-0.10.4/activation.rb' zsh:1: parse error near &&'because the command here becomes&& ruby - ....ruby-lsp/vscode/src/ruby/custom.ts
Line 12 in 4c109e3
It is sometimes case with me to find two ruby projects use different tools to manage ruby.
This change allows users to change customRubyCommand for each workspace.
Related to
Implementation
Change option scope from "machine" to "machine-configurable"
Automated Tests
Manual Tests
Add the following .vscode/settings.json to your workspace and enable the extension.
{ "rubyLsp.rubyVersionManager": { "identifier": "custom" }, "rubyLsp.customRubyCommand": "{any command of your choice}" }