From fbae83acd0f7e6ddc7002774451e4e8df6b94286 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 24 Oct 2022 16:07:42 +0200 Subject: [PATCH] fix: Fix standard flycheck command not being executed in the workspace it is being invoked for --- crates/flycheck/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs index 73c3a48b4c5a3..8a91d6066614f 100644 --- a/crates/flycheck/src/lib.rs +++ b/crates/flycheck/src/lib.rs @@ -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()]);