diff options
| author | Jakub Panek <me@panekj.dev> | 2024-07-29 12:55:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-29 11:55:56 +0100 |
| commit | 8cb5983a53945251c072b87e91e5ca69c1a4214f (patch) | |
| tree | 024cdcff76501aba81579339377af290a0b50f10 | |
| parent | fix(gui): random ts errors (#2316) (diff) | |
| download | atuin-8cb5983a53945251c072b87e91e5ca69c1a4214f.zip | |
fix: atuin-daemon optional dependency (#2306)
| -rw-r--r-- | crates/atuin/Cargo.toml | 4 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/history.rs | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/crates/atuin/Cargo.toml b/crates/atuin/Cargo.toml index a15d2451..f8d5c0b3 100644 --- a/crates/atuin/Cargo.toml +++ b/crates/atuin/Cargo.toml @@ -36,7 +36,7 @@ atuin = { path = "/usr/bin/atuin" } default = ["client", "sync", "server", "clipboard", "check-update", "daemon"] client = ["atuin-client"] sync = ["atuin-client/sync"] -daemon = ["atuin-client/daemon"] +daemon = ["atuin-client/daemon", "atuin-daemon"] server = ["atuin-server", "atuin-server-postgres"] clipboard = ["arboard"] check-update = ["atuin-client/check-update"] @@ -48,7 +48,7 @@ atuin-client = { path = "../atuin-client", version = "18.4.0-beta.3", optional = atuin-common = { path = "../atuin-common", version = "18.4.0-beta.3" } atuin-dotfiles = { path = "../atuin-dotfiles", version = "18.4.0-beta.3" } atuin-history = { path = "../atuin-history", version = "18.4.0-beta.3" } -atuin-daemon = { path = "../atuin-daemon", version = "18.4.0-beta.3" } +atuin-daemon = { path = "../atuin-daemon", version = "18.4.0-beta.3", optional = true, default-features = false } log = { workspace = true } env_logger = "0.11.2" diff --git a/crates/atuin/src/command/client/history.rs b/crates/atuin/src/command/client/history.rs index 17b400f3..a4eea825 100644 --- a/crates/atuin/src/command/client/history.rs +++ b/crates/atuin/src/command/client/history.rs @@ -323,6 +323,7 @@ impl Cmd { Ok(()) } + #[cfg(feature = "daemon")] async fn handle_daemon_start(settings: &Settings, command: &[String]) -> Result<()> { let command = command.join(" "); @@ -425,6 +426,7 @@ impl Cmd { Ok(()) } + #[cfg(feature = "daemon")] #[allow(unused_variables)] async fn handle_daemon_end( settings: &Settings, @@ -543,6 +545,7 @@ impl Cmd { pub async fn run(self, settings: &Settings) -> Result<()> { let context = current_context(); + #[cfg(feature = "daemon")] // Skip initializing any databases for start/end, if the daemon is enabled if settings.daemon.enabled { match self { |
