diff options
author | Kirill Chibisov <wchibisovkirill@gmail.com> | 2019-10-06 13:47:20 +0300 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2019-10-06 12:47:20 +0200 |
commit | 24651a6144e5071f0a72d991734a9b380255156e (patch) | |
tree | 92135f2f51abb709229dd94c29e0331cec01bf42 /alacritty/src/main.rs | |
parent | 729eef0c933831bccfeac6a355bdb410787fbe5f (diff) | |
download | r-alacritty-24651a6144e5071f0a72d991734a9b380255156e.tar.gz r-alacritty-24651a6144e5071f0a72d991734a9b380255156e.tar.bz2 r-alacritty-24651a6144e5071f0a72d991734a9b380255156e.zip |
Remove automatic config generation
Fixes #2818.
Diffstat (limited to 'alacritty/src/main.rs')
-rw-r--r-- | alacritty/src/main.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/alacritty/src/main.rs b/alacritty/src/main.rs index 146709fd..cbd00443 100644 --- a/alacritty/src/main.rs +++ b/alacritty/src/main.rs @@ -34,7 +34,7 @@ use std::sync::Arc; #[cfg(target_os = "macos")] use dirs; use glutin::event_loop::EventLoop as GlutinEventLoop; -use log::{error, info}; +use log::info; #[cfg(windows)] use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS}; @@ -85,18 +85,8 @@ fn main() { .expect("Unable to initialize logger"); // Load configuration file - // If the file is a command line argument, we won't write a generated default file - let config_path = options - .config_path() - .or_else(config::installed_config) - .or_else(|| config::write_defaults().ok()) - .map(|path| path.to_path_buf()); - let config = if let Some(path) = config_path { - config::load_from(path) - } else { - error!("Unable to write the default config"); - Config::default() - }; + let config_path = options.config_path().or_else(config::installed_config); + let config = config_path.map(config::load_from).unwrap_or_else(Config::default); let config = options.into_config(config); // Update the log level from config |