Modify the script to allow for running docker images on Windows 7.

This commit is contained in:
kennytm 2017-11-01 01:39:47 +08:00
parent 1b5aaf22e8
commit 33400fbbcd
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
3 changed files with 60 additions and 9 deletions

View file

@ -31,9 +31,9 @@ pub fn check(path: &Path, bad: &mut bool) {
if let Ok(mut file) = fs::File::open("/proc/version") {
let mut contents = String::new();
file.read_to_string(&mut contents).unwrap();
// Probably on Windows Linux Subsystem, all files will be marked as
// executable, so skip checking.
if contents.contains("Microsoft") {
// 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") {
return;
}
}