diff options
author | Tezkerek <andrei.ancuta@gmail.com> | 2018-12-08 22:51:36 +0200 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-12-08 20:51:36 +0000 |
commit | aef38d6c2fb384cf29a948a19c67733960983d3b (patch) | |
tree | d51235f4252329bf9060ed05efb463da43462363 | |
parent | f32facfbfd3d46b76744d118fd2fa5123501f900 (diff) | |
download | alacritty-aef38d6c2fb384cf29a948a19c67733960983d3b.tar.gz alacritty-aef38d6c2fb384cf29a948a19c67733960983d3b.zip |
Change missing config log level to info
-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() }) } |