From 1b77cb3491b6fcfd33fd06396c39fcab0f17e771 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 4 Jul 2021 08:44:25 -0700 Subject: [PATCH] ls-fonts: report config file errors Previously, if the config file had errors, ls-fonts would silently continue with the default config, which was confusing. Make a point of checking and reporting config file errors. --- wezterm-gui/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wezterm-gui/src/main.rs b/wezterm-gui/src/main.rs index 5f3160c09..bf421a4c6 100644 --- a/wezterm-gui/src/main.rs +++ b/wezterm-gui/src/main.rs @@ -415,6 +415,11 @@ fn maybe_show_configuration_error_window() { pub fn run_ls_fonts(config: config::ConfigHandle, cmd: &LsFontsCommand) -> anyhow::Result<()> { use wezterm_font::parser::ParsedFont; + if let Err(err) = config::configuration_result() { + log::error!("{}", err); + return Ok(()); + } + // Disable the normal config error UI window, as we don't have // a fully baked GUI environment running config::assign_error_callback(|err| eprintln!("{}", err));