Skip to content

Commit 9bb35b8

Browse files
committed
fix atuin-daemon optional dependency
1 parent 3cf5299 commit 9bb35b8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

crates/atuin/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ atuin = { path = "/usr/bin/atuin" }
3636
default = ["client", "sync", "server", "clipboard", "check-update", "daemon"]
3737
client = ["atuin-client"]
3838
sync = ["atuin-client/sync"]
39-
daemon = ["atuin-client/daemon"]
39+
daemon = ["atuin-client/daemon", "atuin-daemon"]
4040
server = ["atuin-server", "atuin-server-postgres"]
4141
clipboard = ["arboard"]
4242
check-update = ["atuin-client/check-update"]
@@ -48,7 +48,7 @@ atuin-client = { path = "../atuin-client", version = "18.4.0-beta.3", optional =
4848
atuin-common = { path = "../atuin-common", version = "18.4.0-beta.3" }
4949
atuin-dotfiles = { path = "../atuin-dotfiles", version = "18.4.0-beta.3" }
5050
atuin-history = { path = "../atuin-history", version = "18.4.0-beta.3" }
51-
atuin-daemon = { path = "../atuin-daemon", version = "18.4.0-beta.3" }
51+
atuin-daemon = { path = "../atuin-daemon", version = "18.4.0-beta.3", optional = true, default-features = false }
5252

5353
log = { workspace = true }
5454
env_logger = "0.11.2"

crates/atuin/src/command/client/history.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ impl Cmd {
323323
Ok(())
324324
}
325325

326+
#[cfg(feature = "daemon")]
326327
async fn handle_daemon_start(settings: &Settings, command: &[String]) -> Result<()> {
327328
let command = command.join(" ");
328329

@@ -425,6 +426,7 @@ impl Cmd {
425426
Ok(())
426427
}
427428

429+
#[cfg(feature = "daemon")]
428430
#[allow(unused_variables)]
429431
async fn handle_daemon_end(
430432
settings: &Settings,
@@ -543,6 +545,7 @@ impl Cmd {
543545
pub async fn run(self, settings: &Settings) -> Result<()> {
544546
let context = current_context();
545547

548+
#[cfg(feature = "daemon")]
546549
// Skip initializing any databases for start/end, if the daemon is enabled
547550
if settings.daemon.enabled {
548551
match self {

0 commit comments

Comments
 (0)