From 53089fb4b6f5bf87afae3925c89e9d4b2e1e6ff6 Mon Sep 17 00:00:00 2001 From: zrll_ Date: Tue, 12 Mar 2024 23:28:55 +0800 Subject: [PATCH] fix: use absolute path when printing config path --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 39ba3ed..b28d184 100644 --- a/src/config.rs +++ b/src/config.rs @@ -92,7 +92,6 @@ impl Config { .find(|(key, _)| key == "CONFIG_PATH") .map(|(_, value)| value) .unwrap_or("config.toml".to_string()); - println!("Loading config from {config_path}"); let mut raw_config = String::new(); let mut file = OpenOptions::new() @@ -102,6 +101,7 @@ impl Config { .open(&config_path) .expect(format!("Cannot open {config_path}").as_str()); file.read_to_string(&mut raw_config).unwrap(); + println!("Loading config from {:?}", std::fs::canonicalize(&config_path).unwrap()); let config: Config = toml::from_str(&raw_config).unwrap();