diff --git a/src/compare/parse.rs b/src/compare/parse.rs index 3b6e0a3..10cb01d 100644 --- a/src/compare/parse.rs +++ b/src/compare/parse.rs @@ -55,7 +55,16 @@ where .arg("--eval") .arg(elisp_script); let out = cmd.output()?; - out.status.exit_ok()?; + let status = out.status.exit_ok(); + if status.is_err() { + eprintln!( + "Emacs errored out: {}\n{}", + String::from_utf8(out.stdout)?, + String::from_utf8(out.stderr)? + ); + status?; + unreachable!(); + } let org_sexp = out.stderr; Ok(String::from_utf8(org_sexp)?) } @@ -98,7 +107,16 @@ where .arg("--eval") .arg(elisp_script); let out = cmd.output()?; - out.status.exit_ok()?; + let status = out.status.exit_ok(); + if status.is_err() { + eprintln!( + "Emacs errored out: {}\n{}", + String::from_utf8(out.stdout)?, + String::from_utf8(out.stderr)? + ); + status?; + unreachable!(); + } let org_sexp = out.stderr; Ok(String::from_utf8(org_sexp)?) }