From 0e2e254b30370a254a8de31b1b554da8d8d1096f Mon Sep 17 00:00:00 2001 From: Daniel Pfister <80419299+0x2a-42@users.noreply.github.com> Date: Fri, 31 May 2024 21:29:17 +0200 Subject: [PATCH] Show error when grammar file does not exist --- src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 93cabc6..165a5c4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,9 +51,7 @@ pub fn compile( short: bool, ) -> std::io::Result { 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![];