Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lolbinarycat committed Jul 31, 2024
1 parent 5f0b85a commit 77c63bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,18 @@ than building it.
has_target |= STAGE0_MISSING_TARGETS.contains(&target_str.as_str());

if !has_target {
// This might also be a custom target, so check the target file that could have been specified by the user.
// This might also be a custom target, so check the target file that could have been specified by the user.
if target.filepath().is_some_and(|p| p.exists()) {
has_target = true;
} else if let Some(custom_target_path) = env::var_os("RUST_TARGET_PATH") {
let mut target_filename = OsString::from(&target_str);
// Target filename ends with `.json`.
target_filename.push(".json");

// Recursively traverse through nested directories.
let walker = walkdir::WalkDir::new(custom_target_path).into_iter();
for entry in walker.filter_map(|e| e.ok()) {
has_target |= entry.file_name() == target_filename;
has_target |= entry.file_name() == target_filename;
}
}
}
Expand Down

0 comments on commit 77c63bc

Please sign in to comment.