diff options
author | Matt Fellenz <matt@felle.nz> | 2024-04-21 04:12:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-21 11:12:55 +0000 |
commit | 44dc9e19f4bbf89d1789502953683ca201668fe4 (patch) | |
tree | 3d6718c30ea0f8f91ca6cf167a5f3b942f75c59f | |
parent | 18fff6a12b2d20ae76fc3152db01daaa71a96aba (diff) | |
download | alacritty-44dc9e19f4bbf89d1789502953683ca201668fe4.tar.gz alacritty-44dc9e19f4bbf89d1789502953683ca201668fe4.zip |
Fix missing config import warning
-rw-r--r-- | alacritty/src/config/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/alacritty/src/config/mod.rs b/alacritty/src/config/mod.rs index a77ed770..4ae3b67d 100644 --- a/alacritty/src/config/mod.rs +++ b/alacritty/src/config/mod.rs @@ -263,13 +263,12 @@ fn load_imports(config: &Value, config_paths: &mut Vec<PathBuf>, recursion_limit }, }; - if !path.exists() { - info!(target: LOG_TARGET_CONFIG, "Config import not found:\n {:?}", path.display()); - continue; - } - match parse_config(&path, config_paths, recursion_limit - 1) { Ok(config) => merged = serde_utils::merge(merged, config), + Err(Error::Io(io)) if io.kind() == io::ErrorKind::NotFound => { + info!(target: LOG_TARGET_CONFIG, "Config import not found:\n {:?}", path.display()); + continue; + }, Err(err) => { error!(target: LOG_TARGET_CONFIG, "Unable to import config {:?}: {}", path, err) }, |