diff --git a/crates/hyfetch/src/bin/hyfetch.rs b/crates/hyfetch/src/bin/hyfetch.rs index e23192bb..ae37410a 100644 --- a/crates/hyfetch/src/bin/hyfetch.rs +++ b/crates/hyfetch/src/bin/hyfetch.rs @@ -268,15 +268,15 @@ fn det_bg() -> Result>, terminal_colorsaurus::Error> { return Ok(None); } - background_color(QueryOptions::default()) - .map(|terminal_colorsaurus::Color { r, g, b , .. }| Some(Srgb::new(r, g, b).into_format())) - .or_else(|err| { - if matches!(err, terminal_colorsaurus::Error::UnsupportedTerminal(_)) { - Ok(None) - } else { - Err(err) - } - }) + match background_color(QueryOptions::default()) { + Ok(terminal_colorsaurus::Color { r, g, b, .. }) => { + Ok(Some(Srgb::new(r, g, b).into_format())) + } + Err(err) => { + debug!(?err, "failed to detect background color"); + Ok(None) + } + } } /// Creates config interactively.