rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

`Run Tests | Debug` enter different PWDs

Open Banyc opened this issue 3 years ago • 1 comments

rust-analyzer version: v0.4.1214

rustc version: 1.63.0

relevant settings: none

Given a project structure like this:

- test_ra_pwd/
  - sub/
    - Cargo.toml
    - src/
      - main.rs
  - Cargo.toml
  - Cargo.lock
  - target/

In main.rs, Run Tests sets PWD to test_ra_pwd/sub but Debug sets PWD to test_ra_pwd.

Debug should set PWD to the same one as Run Tests to better simulate the actual running environment.

I made a working example: https://github.com/Banyc/test_ra_pwd

Banyc avatar Sep 20 '22 11:09 Banyc

I've found a 2-year-old duplicate: https://github.com/rust-lang/rust-analyzer/issues/6422

Banyc avatar Sep 24 '22 19:09 Banyc