Fix error swallowing (#3338)

This commit is contained in:
tingerrr 2024-02-04 12:23:29 +01:00 committed by GitHub
parent 2594b36701
commit a8f764ab48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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");
}