From 57f69857403fef63240588672db2991fc06f212f Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Tue, 15 Aug 2023 11:32:11 +0530 Subject: [PATCH] fix: history file initialization path Co-authored-by: Filip Tibell --- src/cli/repl.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/cli/repl.rs b/src/cli/repl.rs index 2ef6e7a..84a4893 100644 --- a/src/cli/repl.rs +++ b/src/cli/repl.rs @@ -32,14 +32,7 @@ pub async fn show_interface(cmd: Command) -> Result { .join(".lune_history"); if !history_file_path.exists() { - std::fs::write( - // We know for sure that the home dir already exists - directories::UserDirs::new() - .unwrap() - .home_dir() - .join(".lune_history"), - String::new(), - )?; + std::fs::write(&history_file_path, String::new())?; } repl.load_history(history_file_path)?;