cli: don't print error about broken pipe

`jj log | head` consistently prints "Error: Broken pipe" for me. I
don't know how the output gets printed after the pipe has been closed,
but neither `git` nor `hg` prints an error, so I think we shouldn't
either.
This commit is contained in:
Martin von Zweigbergk 2023-02-14 09:59:42 -08:00 committed by Martin von Zweigbergk
parent 0abf9ce8cd
commit 54156335e4

View File

@ -2022,9 +2022,7 @@ pub fn handle_command_result(
}
}
Err(CommandError::BrokenPipe) => {
// It's unlikely this write() would succeed, but try anyway to either
// print error message or raise new io::Error.
writeln!(ui.error(), "Error: Broken pipe")?;
// A broken pipe is not an error, but a signal to exit gracefully.
Ok(ExitCode::from(BROKEN_PIPE_EXIT_CODE))
}
Err(CommandError::InternalError(message)) => {