diff options
| author | Benjamin Weinstein-Raun <b@w-r.me> | 2025-03-24 04:00:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 11:00:16 +0000 |
| commit | f0fca3d7f34814a8a3cf5d3be3578f747ecda562 (patch) | |
| tree | 58239d17449b03155022fc448478b4817554e668 /crates/atuin-client/src/import/xonsh_sqlite.rs | |
| parent | chore(deps): bump cachix/install-nix-action from 30 to 31 (#2633) (diff) | |
| download | atuin-f0fca3d7f34814a8a3cf5d3be3578f747ecda562.zip | |
fixes #1884: HISTFILE can be a directory or a file (#2630)
Xonsh history import was failing (in the default xonsh configuration)
because $HISTFILE is actually a directory in that case. This change sets
up the xonsh import to check for a *directory* instead of a regular
file, and makes it clearer that other importers expect a regular file.
Diffstat (limited to 'crates/atuin-client/src/import/xonsh_sqlite.rs')
| -rw-r--r-- | crates/atuin-client/src/import/xonsh_sqlite.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/atuin-client/src/import/xonsh_sqlite.rs b/crates/atuin-client/src/import/xonsh_sqlite.rs index 1b8d76fc..7d50ac84 100644 --- a/crates/atuin-client/src/import/xonsh_sqlite.rs +++ b/crates/atuin-client/src/import/xonsh_sqlite.rs @@ -10,7 +10,7 @@ use time::OffsetDateTime; use uuid::Uuid; use uuid::timestamp::{Timestamp, context::NoContext}; -use super::{Importer, Loader, get_histpath}; +use super::{Importer, Loader, get_histfile_path}; use crate::history::History; use crate::utils::get_host_user; @@ -93,7 +93,7 @@ impl Importer for XonshSqlite { async fn new() -> Result<Self> { // wrap xonsh-specific path resolver in general one so that it respects $HISTPATH let xonsh_data_dir = env::var("XONSH_DATA_DIR").ok(); - let db_path = get_histpath(|| xonsh_db_path(xonsh_data_dir))?; + let db_path = get_histfile_path(|| xonsh_db_path(xonsh_data_dir))?; let connection_str = db_path.to_str().ok_or_else(|| { eyre!( "Invalid path for SQLite database: {}", |
