From 5c2a610d315a95472e6d463b7294dee86c00d6e1 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Fri, 18 Oct 2024 21:13:44 +0200 Subject: [PATCH] ltcc: exit with error code when typecheck or compilation fails --- ltcc/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ltcc/src/main.rs b/ltcc/src/main.rs index 6dd9cd9..f07337a 100644 --- a/ltcc/src/main.rs +++ b/ltcc/src/main.rs @@ -73,7 +73,7 @@ fn main() { eprintln!("----------------------------------"); eprintln!("{} ({} errors)", "Typecheck failed".bright_red().bold(), type_errs.len()); - return; + std::process::exit(-2); } } @@ -120,6 +120,7 @@ fn main() { ); eprintln!("=======\nParse Error: Abort\n"); + std::process::exit(-1); } } }