From d61375bb0849770b42802f0040253c95900bb8f8 Mon Sep 17 00:00:00 2001 From: Dustin Blackman Date: Fri, 1 Mar 2024 20:55:17 -0500 Subject: [PATCH] fix: Config file log message on windows --- src/application/cli.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/application/cli.rs b/src/application/cli.rs index 1228422..9019e97 100644 --- a/src/application/cli.rs +++ b/src/application/cli.rs @@ -95,11 +95,12 @@ async fn create_config_file() -> Result<()> { fs::create_dir_all(config_file_path.parent().unwrap()).await?; } - let mut file = fs::File::create(config_file_path).await?; + let mut file = fs::File::create(config_file_path.clone()).await?; file.write_all(Config::serialize_default(build()).as_bytes()) .await?; - println!("Created default config file at {config_file_path_str}"); + let config_path_display = config_file_path.as_os_str().to_str().unwrap(); + println!("Created default config file at {config_path_display}"); return Ok(()); }