Skip to content

Commit

Permalink
Auto merge of rust-lang#13478 - Veykril:fix-flycheck, r=Veykril
Browse files Browse the repository at this point in the history
fix: Fix standard flycheck command not being executed in the workspace it is being invoked for

Fixes rust-lang/rust-analyzer#13477
  • Loading branch information
bors committed Oct 24, 2022
2 parents 98aa678 + fbae83a commit 53b6d69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ impl FlycheckActor {
} => {
let mut cmd = Command::new(toolchain::cargo());
cmd.arg(command);
cmd.args(&["--workspace", "--message-format=json"]);
cmd.current_dir(&self.root);
cmd.args(&["--workspace", "--message-format=json", "--manifest-path"])
.arg(self.root.join("Cargo.toml").as_os_str());

if let Some(target) = target_triple {
cmd.args(&["--target", target.as_str()]);
Expand Down

0 comments on commit 53b6d69

Please sign in to comment.