mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
fix: history file initialization path
Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
parent
aa50d3e5af
commit
57f6985740
1 changed files with 1 additions and 8 deletions
|
@ -32,14 +32,7 @@ pub async fn show_interface(cmd: Command) -> Result<ExitCode> {
|
||||||
.join(".lune_history");
|
.join(".lune_history");
|
||||||
|
|
||||||
if !history_file_path.exists() {
|
if !history_file_path.exists() {
|
||||||
std::fs::write(
|
std::fs::write(&history_file_path, String::new())?;
|
||||||
// We know for sure that the home dir already exists
|
|
||||||
directories::UserDirs::new()
|
|
||||||
.unwrap()
|
|
||||||
.home_dir()
|
|
||||||
.join(".lune_history"),
|
|
||||||
String::new(),
|
|
||||||
)?;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repl.load_history(history_file_path)?;
|
repl.load_history(history_file_path)?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue