diff options
author | quininer kel <quininer@live.com> | 2017-01-06 12:56:05 +0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2017-01-06 11:17:33 -0800 |
commit | 2befe3681e7e813e704fbbf75a520e04bf049d36 (patch) | |
tree | b9e0d11ffeafb3a0c8607206acdee54d07cf27f1 /src/main.rs | |
parent | 7d07b5a1655dc9d1cda62f1dd3005b966c0fa76a (diff) | |
download | alacritty-2befe3681e7e813e704fbbf75a520e04bf049d36.tar.gz alacritty-2befe3681e7e813e704fbbf75a520e04bf049d36.zip |
Write default config when not found
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 3328ab59..ce323ac1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,11 @@ fn main() { match err { // Use default config when not found config::Error::NotFound => { - err_println!("Config file not found; using defaults"); + match Config::write_defaults() { + Ok(path) => err_println!("Config file not found; write defaults config to {:?}", path), + Err(err) => err_println!("Write defaults config failure: {}", err) + } + Config::default() }, |