Skip to content

Commit

Permalink
Reuse existing target directory
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Feb 24, 2023
1 parent 97f8a9b commit 999c4ce
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/rustdoc_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ impl RustdocCommand {
.manifest_path(manifest_path)
.no_deps()
.exec()?;
let manifest_target_directory = metadata
.target_directory
.as_path()
.as_std_path()
// HACK: Avoid potential errors when mixing toolchains
.join(crate::util::SCOPE)
.join("target");
let target_dir = manifest_target_directory.as_path();
let target_dir = metadata
.workspace_root
.ancestors()
.nth(2)
.unwrap()
.as_std_path();

let stderr = if self.silence {
std::process::Stdio::piped()
Expand Down

0 comments on commit 999c4ce

Please sign in to comment.