Skip to content

Commit

Permalink
fix: use absolute path when printing config path
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Mar 12, 2024
1 parent bd9a717 commit 53089fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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();

Expand Down

0 comments on commit 53089fb

Please sign in to comment.