From f0662e51c73e4878bb9bc2112d3a2e161660dafa Mon Sep 17 00:00:00 2001 From: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> Date: Sat, 25 Jul 2020 13:11:35 -0500 Subject: [PATCH 1/2] Don't run tidy on WSL2 WSL has a lowercase "microsoft' in `/proc/version` --- src/tools/tidy/src/bins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/bins.rs b/src/tools/tidy/src/bins.rs index 589be26dc27ed..df11ab161dc6a 100644 --- a/src/tools/tidy/src/bins.rs +++ b/src/tools/tidy/src/bins.rs @@ -20,7 +20,7 @@ pub fn check(path: &Path, bad: &mut bool) { if let Ok(contents) = fs::read_to_string("/proc/version") { // Probably on Windows Linux Subsystem or Docker via VirtualBox, // all files will be marked as executable, so skip checking. - if contents.contains("Microsoft") || contents.contains("boot2docker") { + if contents.contains("Microsoft") || contents.contains("microsoft") || contents.contains("boot2docker") { return; } } From 8cdb4eb3b2d05ff3e51ce9dbfbd002876fa9b2f5 Mon Sep 17 00:00:00 2001 From: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> Date: Sat, 25 Jul 2020 13:24:51 -0500 Subject: [PATCH 2/2] Run tidy --- src/tools/tidy/src/bins.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/tidy/src/bins.rs b/src/tools/tidy/src/bins.rs index df11ab161dc6a..8f6d2a3ed7fe7 100644 --- a/src/tools/tidy/src/bins.rs +++ b/src/tools/tidy/src/bins.rs @@ -20,7 +20,10 @@ pub fn check(path: &Path, bad: &mut bool) { if let Ok(contents) = fs::read_to_string("/proc/version") { // Probably on Windows Linux Subsystem or Docker via VirtualBox, // all files will be marked as executable, so skip checking. - if contents.contains("Microsoft") || contents.contains("microsoft") || contents.contains("boot2docker") { + if contents.contains("Microsoft") + || contents.contains("microsoft") + || contents.contains("boot2docker") + { return; } }