aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--atuin/src/command/client/history.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/atuin/src/command/client/history.rs b/atuin/src/command/client/history.rs
index 18fd5794..b91fc57a 100644
--- a/atuin/src/command/client/history.rs
+++ b/atuin/src/command/client/history.rs
@@ -152,7 +152,12 @@ pub fn print_list(
for h in iterator {
let fh = FmtHistory(h, CmdFormat::for_output(&w));
let args = parsed_fmt.with_args(&fh);
- check_for_write_errors(write!(w, "{args}{entry_terminator}"));
+ let write = write!(w, "{args}{entry_terminator}");
+ if let Err(err) = args.status() {
+ eprintln!("ERROR: history output failed with: {err}");
+ std::process::exit(1);
+ }
+ check_for_write_errors(write);
if flush_each_line {
check_for_write_errors(w.flush());
}