Skip to content

Update package.json#4120

Open
i10416 wants to merge 2 commits into
Shopify:mainfrom
i10416:patch-1
Open

Update package.json#4120
i10416 wants to merge 2 commits into
Shopify:mainfrom
i10416:patch-1

Conversation

@i10416
Copy link
Copy Markdown

@i10416 i10416 commented May 26, 2026

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 - ....

const parsedResult = await this.runEnvActivationScript(`${this.customCommand()} && ruby`);

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}"
}

@i10416 i10416 requested a review from a team as a code owner May 26, 2026 15:22
@i10416
Copy link
Copy Markdown
Author

i10416 commented May 26, 2026

Just signed CLA

@i10416
Copy link
Copy Markdown
Author

i10416 commented May 26, 2026

BTW, this is never true because workspace.getConfiguration(...).get(...) returns default value for some primitive types;

if (customCommand === undefined) {

microsoft/vscode#123957 (comment)

It must use inspect method to detect null value.

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.

1 participant