Skip to content

Commit bf9782d

Browse files
Fix tidy --bless on Windows
1 parent d03b986 commit bf9782d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/tidy/src/ui_tests.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ pub fn check(path: &Path, bless: bool, bad: &mut bool) {
190190
let blessed_issues_path = tidy_src.join("issues_blessed.txt");
191191
let mut blessed_issues_txt = fs::File::create(&blessed_issues_path).unwrap();
192192
blessed_issues_txt.write(issues_txt_header.as_bytes()).unwrap();
193-
for filename in allowed_issue_names.difference(&remaining_issue_names) {
193+
// If we changed paths to use the OS separator, reassert Unix chauvinism for blessing.
194+
for filename in allowed_issue_names
195+
.difference(&remaining_issue_names)
196+
.map(|s| s.replace(std::path::MAIN_SEPARATOR_STR, "/"))
197+
{
194198
write!(blessed_issues_txt, "\"{filename}\",\n").unwrap();
195199
}
196200
write!(blessed_issues_txt, "]\n").unwrap();

0 commit comments

Comments
 (0)