From c52c2cd10f1e5dd9f1553425cc20ee67023cbdf7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 18 Nov 2024 14:56:33 -0500 Subject: [PATCH] Prevent Shadowenv from mutating BUNDLE_GEMFILE --- vscode/src/ruby/shadowenv.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vscode/src/ruby/shadowenv.ts b/vscode/src/ruby/shadowenv.ts index 0f03cfcf0..06caff075 100644 --- a/vscode/src/ruby/shadowenv.ts +++ b/vscode/src/ruby/shadowenv.ts @@ -32,6 +32,10 @@ export class Shadowenv extends VersionManager { `${shadowenvExec} exec -- ruby`, ); + // Do not let Shadowenv change the BUNDLE_GEMFILE. The server has to be able to control this in order to properly + // set up the environment + delete parsedResult.env.BUNDLE_GEMFILE; + return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit,