1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-06 19:21:43 +00:00

Propagate initial input read errors

This commit is contained in:
lawrence3699
2026-04-28 01:11:06 +10:00
parent de2f21562a
commit 64567c4819
3 changed files with 38 additions and 11 deletions
+2 -2
View File
@@ -155,7 +155,7 @@ impl LessOpenPreprocessor {
Ok(OpenedInput {
kind,
reader: InputReader::new(BufReader::new(
reader: InputReader::try_new(BufReader::new(
if matches!(self.kind, LessOpenKind::TempFile) {
let lessopen_string = match String::from_utf8(lessopen_stdout) {
Ok(string) => string,
@@ -192,7 +192,7 @@ impl LessOpenPreprocessor {
.map(|s| s.replacen("%s", &path_str, 1).replacen("%s", "-", 1)),
}
},
)),
))?,
metadata: input.metadata,
description: input.description,
})