fix: history file initialization path

Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
Erica Marigold 2023-08-15 11:32:11 +05:30 committed by GitHub
parent aa50d3e5af
commit 57f6985740
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,14 +32,7 @@ pub async fn show_interface(cmd: Command) -> Result<ExitCode> {
.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)?;