Skip to content

Commit

Permalink
Pass plugin env variable to LS subprocess (#6176)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcticae authored Aug 8, 2024
1 parent 0f0f721 commit fdf3d70
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vscode-cairo/src/cairols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,13 @@ function setupEnv(serverExecutable: lc.Executable, ctx: Context) {
const extraEnv = ctx.config.get("languageServerExtraEnv");

serverExecutable.options ??= {};
serverExecutable.options.env ??= {};
Object.assign(serverExecutable.options.env, logEnv, extraEnv);
serverExecutable.options.env = {
// Inherit env from parent process.
...process.env,
...(serverExecutable.options.env ?? {}),
...logEnv,
...extraEnv,
};
}

function buildEnvFilter(ctx: Context): string {
Expand Down

0 comments on commit fdf3d70

Please sign in to comment.