Keep searching if justfile isn't found

This commit is contained in:
Casey Rodarmor 2016-09-28 00:02:18 -07:00
parent 9f9346b338
commit f3a92285af

View File

@ -77,7 +77,11 @@ fn main() {
loop {
match std::fs::metadata("justfile") {
Ok(metadata) => if metadata.is_file() { break; },
Err(error) => die!("Error fetching justfile metadata: {}", error),
Err(error) => {
if error.kind() != std::io::ErrorKind::NotFound {
die!("Error fetching justfile metadata: {}", error)
}
}
}
match std::fs::metadata("Justfile") {
@ -85,7 +89,11 @@ fn main() {
justfile = "Justfile";
break;
},
Err(error) => die!("Error fetching justfile metadata: {}", error),
Err(error) => {
if error.kind() != std::io::ErrorKind::NotFound {
die!("Error fetching Justfile metadata: {}", error)
};
}
}
match std::env::current_dir() {