Don't pass any target directory options to custom flycheck

This commit is contained in:
Victor Song 2023-10-09 02:03:45 -05:00
parent 2290cc3cf3
commit 9771e1e18f
2 changed files with 1 additions and 9 deletions

View File

@ -58,7 +58,6 @@ pub enum FlycheckConfig {
extra_env: FxHashMap<String, String>, extra_env: FxHashMap<String, String>,
invocation_strategy: InvocationStrategy, invocation_strategy: InvocationStrategy,
invocation_location: InvocationLocation, invocation_location: InvocationLocation,
target_dir: Option<PathBuf>,
}, },
} }
@ -355,7 +354,6 @@ impl FlycheckActor {
extra_env, extra_env,
invocation_strategy, invocation_strategy,
invocation_location, invocation_location,
target_dir,
} => { } => {
let mut cmd = Command::new(command); let mut cmd = Command::new(command);
cmd.envs(extra_env); cmd.envs(extra_env);
@ -377,10 +375,6 @@ impl FlycheckActor {
} }
} }
if let Some(target_dir) = target_dir {
cmd.arg("--target-dir").arg(target_dir);
}
(cmd, args) (cmd, args)
} }
}; };

View File

@ -1289,7 +1289,6 @@ impl Config {
} }
pub fn flycheck(&self) -> FlycheckConfig { pub fn flycheck(&self) -> FlycheckConfig {
let target_dir = self.target_dir_from_config();
match &self.data.check_overrideCommand { match &self.data.check_overrideCommand {
Some(args) if !args.is_empty() => { Some(args) if !args.is_empty() => {
let mut args = args.clone(); let mut args = args.clone();
@ -1310,7 +1309,6 @@ impl Config {
} }
InvocationLocation::Workspace => flycheck::InvocationLocation::Workspace, InvocationLocation::Workspace => flycheck::InvocationLocation::Workspace,
}, },
target_dir,
} }
} }
Some(_) | None => FlycheckConfig::CargoCommand { Some(_) | None => FlycheckConfig::CargoCommand {
@ -1345,7 +1343,7 @@ impl Config {
extra_args: self.check_extra_args(), extra_args: self.check_extra_args(),
extra_env: self.check_extra_env(), extra_env: self.check_extra_env(),
ansi_color_output: self.color_diagnostic_output(), ansi_color_output: self.color_diagnostic_output(),
target_dir, target_dir: self.target_dir_from_config(),
}, },
} }
} }