mirror of
https://github.com/casey/just.git
synced 2024-11-22 18:34:06 +03:00
Keep searching if justfile isn't found
This commit is contained in:
parent
9f9346b338
commit
f3a92285af
12
src/main.rs
12
src/main.rs
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user