rust-lang / rust-lang/rust-analyzer

`rust-analyzer.runnables.extraEnv` not applied when `rust-analyzer.runnables.test.overrideCommand` is set

Open
#21,482 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

I wanted to setup nextest to run tests with some env variables. Turns out these features work separately, but not together. So I have no idea how to provide env variables for a custom test command.

rust-analyzer version: 0.3.2753-standalone (d43c636243 2026-01-12)

rustc version: rustc 1.91.1 (ed61e7d7e 2025-11-07)

editor or extension: VsCode

relevant settings: rust-analyzer.runnables.extraEnv, rust-analyzer.runnables.test.overrideCommand

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a test runnable using rust-analyzer.runnables.extraEnv together with rust-analyzer.runnables.test.overrideCommand, using VS Code and the reported rust-analyzer version. Trace the runnable configuration entry point for these settings and verify that the configured environment variables reach the custom test command; done means both settings work together.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.