Skip to content

Commit

Permalink
Pass target directory as flag instead of env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrubias committed Oct 6, 2023
1 parent b8eae19 commit 09421fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,6 @@ impl FlycheckActor {
let mut cmd = Command::new(command);
cmd.envs(extra_env);

if let Some(target_dir) = target_dir {
cmd.env("CARGO_TARGET_DIR", target_dir);
}

match invocation_location {
InvocationLocation::Workspace => {
match invocation_strategy {
Expand All @@ -381,6 +377,10 @@ impl FlycheckActor {
}
}

if let Some(target_dir) = target_dir {
cmd.arg("--target-dir").arg(target_dir);
}

(cmd, args)
}
};
Expand Down

0 comments on commit 09421fd

Please sign in to comment.