Merge nucleic/sleek-thistle-egret-fyej into dev

This commit is contained in:
2026-07-18 05:19:31 -07:00
commit b6be87b72d
677 changed files with 102939 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#[derive(Debug, Default, Clone)]
pub(crate) struct Formatter {
pub use_color: bool,
}
impl brush_core::extensions::ErrorFormatter for Formatter {
fn format_error(
&self,
err: &brush_core::error::Error,
_shell: &brush_core::Shell<impl brush_core::ShellExtensions>,
) -> String {
let prefix = if self.use_color {
color_print::cstr!("<red>error:</red> ")
} else {
"error: "
};
std::format!("{prefix}{err:#}\n")
}
}