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.
This commit is contained in:
Wez Furlong committed 2021-07-04 08:55:08 -07:00
1 parent 305c64c7ab
commit 1b77cb3491
1 file changed
+5
+5
View File
@@ -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));