about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-03-06 20:14:12 -0800
committerJubilee Young <workingjubilee@gmail.com>2024-03-06 20:14:12 -0800
commitbf9782dd9d14268d0c72ac13b24fa35c6a2e5a57 (patch)
tree544853fe0644756751d7030cc596c24bd511500b
parentd03b986db1f4146b58078c9dde5b0fa6d808f031 (diff)
downloadrust-bf9782dd9d14268d0c72ac13b24fa35c6a2e5a57.tar.gz
rust-bf9782dd9d14268d0c72ac13b24fa35c6a2e5a57.zip
Fix tidy --bless on Windows
-rw-r--r--src/tools/tidy/src/ui_tests.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index a9c5be913ba..1a53637ad42 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -190,7 +190,11 @@ pub fn check(path: &Path, bless: bool, bad: &mut bool) {
         let blessed_issues_path = tidy_src.join("issues_blessed.txt");
         let mut blessed_issues_txt = fs::File::create(&blessed_issues_path).unwrap();
         blessed_issues_txt.write(issues_txt_header.as_bytes()).unwrap();
-        for filename in allowed_issue_names.difference(&remaining_issue_names) {
+        // If we changed paths to use the OS separator, reassert Unix chauvinism for blessing.
+        for filename in allowed_issue_names
+            .difference(&remaining_issue_names)
+            .map(|s| s.replace(std::path::MAIN_SEPARATOR_STR, "/"))
+        {
             write!(blessed_issues_txt, "\"{filename}\",\n").unwrap();
         }
         write!(blessed_issues_txt, "]\n").unwrap();