mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-08 06:12:27 +01:00
Send errors to stderr (#3336)
* fix: send errors to stderr by default (#2561) Closes #2561 * chore: add changelog entry * chore: change PR id * chore: add github username * chore: cargo fmt... * chore: move changelog line to bugfixes
This commit is contained in:
@@ -67,7 +67,13 @@ pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
|
||||
.ok();
|
||||
}
|
||||
_ => {
|
||||
writeln!(output, "{}: {}", Red.paint("[bat error]"), error).ok();
|
||||
writeln!(
|
||||
&mut std::io::stderr().lock(),
|
||||
"{}: {}",
|
||||
Red.paint("[bat error]"),
|
||||
error
|
||||
)
|
||||
.ok();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user