Ignore nonexistent config imports instead of raising an error
Fixes: #4330.
This commit is contained in:
parent
18a226fe45
commit
c1f0e83cbb
|
@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## 0.7.0-dev
|
||||
|
||||
### Changed
|
||||
|
||||
- Nonexistent config imports are ignored instead of raising an error
|
||||
|
||||
### Fixed
|
||||
|
||||
- Wide characters sometimes being cut off
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# These configuration files will be loaded in order, replacing values in files
|
||||
# loaded earlier with those loaded later in the chain. The file itself will
|
||||
# always be loaded last.
|
||||
# always be loaded last. If an import path cannot be found it will be skipped.
|
||||
#import:
|
||||
# - /path/to/alacritty.yml
|
||||
|
||||
|
|
|
@ -222,6 +222,12 @@ fn load_imports(config: &Value, config_paths: &mut Vec<PathBuf>, recursion_limit
|
|||
},
|
||||
};
|
||||
|
||||
if !path.exists() {
|
||||
info!(target: LOG_TARGET_CONFIG, "Skipping importing config; not found:");
|
||||
info!(target: LOG_TARGET_CONFIG, " {:?}", path.display());
|
||||
continue;
|
||||
}
|
||||
|
||||
match parse_config(&path, config_paths, recursion_limit - 1) {
|
||||
Ok(config) => merged = serde_utils::merge(merged, config),
|
||||
Err(err) => {
|
||||
|
|
Loading…
Reference in New Issue