summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fellenz <matt@felle.nz>2024-04-21 04:12:55 -0700
committerGitHub <noreply@github.com>2024-04-21 11:12:55 +0000
commit44dc9e19f4bbf89d1789502953683ca201668fe4 (patch)
tree3d6718c30ea0f8f91ca6cf167a5f3b942f75c59f
parent18fff6a12b2d20ae76fc3152db01daaa71a96aba (diff)
Fix missing config import warning
-rw-r--r--alacritty/src/config/mod.rs9
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)
},