From a8f764ab484de735b3099870204fa613f4f2a2db Mon Sep 17 00:00:00 2001 From: tingerrr Date: Sun, 4 Feb 2024 12:23:29 +0100 Subject: [PATCH] Fix error swallowing (#3338) --- crates/typst-cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/typst-cli/src/main.rs b/crates/typst-cli/src/main.rs index c7221f775..5e1ef47c9 100644 --- a/crates/typst-cli/src/main.rs +++ b/crates/typst-cli/src/main.rs @@ -50,7 +50,7 @@ fn main() -> ExitCode { .leave_alternate_screen() .map_err(|err| eco_format!("failed to leave alternate screen ({err})")); - if let Err(msg) = res.or(res_leave) { + if let Some(msg) = res.err().or(res_leave.err()) { set_failed(); print_error(&msg).expect("failed to print error"); }