Skip to content

Commit

Permalink
xtask
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernQ committed Feb 11, 2025
1 parent ca1d36d commit db70e3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion xtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ pub fn build_documentation(
cargo::run_with_env(&args, &package_path, envs, false)?;

// Build up the path at which the built documentation can be found:
let mut docs_path = workspace.join(package.to_string()).join("target");
let mut docs_path = if let Ok(target_path) = std::env::var("CARGO_TARGET_DIR") {
PathBuf::from(target_path)
} else {
workspace.join(package.to_string()).join("target")
};

if let Some(target) = target {
docs_path = docs_path.join(target);
}
Expand Down
6 changes: 5 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,11 @@ fn lint_package(chip: &Chip, path: &Path, args: &[&str], fix: bool) -> Result<()
let cargo_args = if fix {
cargo_args.arg("--fix").arg("--lib").arg("--allow-dirty")
} else {
cargo_args.arg("--").arg("-D").arg("warnings")
cargo_args
.arg("--")
.arg("-D")
.arg("warnings")
.arg("--no-deps")
};

let cargo_args = cargo_args.build();
Expand Down

0 comments on commit db70e3d

Please sign in to comment.