Skip to content

Commit

Permalink
Show error when grammar file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2a-42 committed May 31, 2024
1 parent 99f8845 commit 0e2e254
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ pub fn compile(
short: bool,
) -> std::io::Result<bool> {
let input_path = Path::new(input);
if !check && !input_path.exists() {
return Ok(false);
}
input_path.try_exists()?;

let source = std::fs::read_to_string(input)?;
let mut diags = vec![];
Expand Down

0 comments on commit 0e2e254

Please sign in to comment.