Auto merge of #13478 - Veykril:fix-flycheck, r=Veykril

fix: Fix standard flycheck command not being executed in the workspace it is being invoked for

Fixes https://github.com/rust-lang/rust-analyzer/issues/13477
This commit is contained in:
bors 2022-10-24 14:08:45 +00:00
commit 53b6d69e93

View file

@ -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()]);