diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/main.rs | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a88c579..3ff77e61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Extra padding is not evenly spread around the terminal by default anymore +- When the config file is empty, Alacritty now logs an info instead of an error message ### Fixed diff --git a/src/main.rs b/src/main.rs index c2a1abc3..9d57f086 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,7 +46,7 @@ extern crate winapi; use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS}; use alacritty::cli; -use alacritty::config::{self, Config}; +use alacritty::config::{self, Config, Error as ConfigError}; use alacritty::display::Display; use alacritty::event; use alacritty::event_loop::{self, EventLoop, Msg}; @@ -101,7 +101,11 @@ fn load_config(options: &cli::Options) -> Config { }); Config::load_from(&*config_path).unwrap_or_else(|err| { - error!("Error: {}; Loading default config", err); + match err { + ConfigError::Empty => info!("Config file {:?} is empty; Loading default", config_path), + _ => error!("Error: {}; Loading default config", err), + } + Config::default() }) } |