diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-06-20 10:28:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-20 10:28:00 +0100 |
| commit | 9b82bba53f3e9eab26eb9af700027342d8a02ce5 (patch) | |
| tree | 0a458246b33e2f6456bbe78606f37d1ef8a77d61 /crates/atuin-client/src/settings.rs | |
| parent | feat(gui): cache zustand store in localstorage (#2168) (diff) | |
| download | atuin-9b82bba53f3e9eab26eb9af700027342d8a02ce5.zip | |
feat(daemon): follow XDG_RUNTIME_DIR if set (#2171)
If XDG_RUNTIME_DIR is set, put the socket file there.
If not, default to storing it in our data dir. We cannot default to a
path such as /run/user/$UID/ because it does not exist on all systems.
Any system running systemd will set this var by default, and ensure that
the directory it points to is correctly setup.
Diffstat (limited to 'crates/atuin-client/src/settings.rs')
| -rw-r--r-- | crates/atuin-client/src/settings.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs index a34758db..d7b03c2b 100644 --- a/crates/atuin-client/src/settings.rs +++ b/crates/atuin-client/src/settings.rs @@ -667,7 +667,7 @@ impl Settings { let data_dir = atuin_common::utils::data_dir(); let db_path = data_dir.join("history.db"); let record_store_path = data_dir.join("records.db"); - let socket_path = data_dir.join("atuin.sock"); + let socket_path = atuin_common::utils::runtime_dir().join("atuin.sock"); let key_path = data_dir.join("key"); let session_path = data_dir.join("session"); |
