aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorquininer kel <quininer@live.com>2017-01-06 12:56:05 +0800
committerJoe Wilm <joe@jwilm.com>2017-01-06 11:17:33 -0800
commit2befe3681e7e813e704fbbf75a520e04bf049d36 (patch)
treeb9e0d11ffeafb3a0c8607206acdee54d07cf27f1 /src/main.rs
parent7d07b5a1655dc9d1cda62f1dd3005b966c0fa76a (diff)
downloadalacritty-2befe3681e7e813e704fbbf75a520e04bf049d36.tar.gz
alacritty-2befe3681e7e813e704fbbf75a520e04bf049d36.zip
Write default config when not found
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
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()
},