mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-22 00:03:49 +01:00
fix: atuin-daemon optional dependency (#2306)
This commit is contained in:
parent
0b01d93083
commit
8cb5983a53
@ -36,7 +36,7 @@ atuin = { path = "/usr/bin/atuin" }
|
|||||||
default = ["client", "sync", "server", "clipboard", "check-update", "daemon"]
|
default = ["client", "sync", "server", "clipboard", "check-update", "daemon"]
|
||||||
client = ["atuin-client"]
|
client = ["atuin-client"]
|
||||||
sync = ["atuin-client/sync"]
|
sync = ["atuin-client/sync"]
|
||||||
daemon = ["atuin-client/daemon"]
|
daemon = ["atuin-client/daemon", "atuin-daemon"]
|
||||||
server = ["atuin-server", "atuin-server-postgres"]
|
server = ["atuin-server", "atuin-server-postgres"]
|
||||||
clipboard = ["arboard"]
|
clipboard = ["arboard"]
|
||||||
check-update = ["atuin-client/check-update"]
|
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-common = { path = "../atuin-common", version = "18.4.0-beta.3" }
|
||||||
atuin-dotfiles = { path = "../atuin-dotfiles", 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-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 }
|
log = { workspace = true }
|
||||||
env_logger = "0.11.2"
|
env_logger = "0.11.2"
|
||||||
|
@ -323,6 +323,7 @@ impl Cmd {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "daemon")]
|
||||||
async fn handle_daemon_start(settings: &Settings, command: &[String]) -> Result<()> {
|
async fn handle_daemon_start(settings: &Settings, command: &[String]) -> Result<()> {
|
||||||
let command = command.join(" ");
|
let command = command.join(" ");
|
||||||
|
|
||||||
@ -425,6 +426,7 @@ impl Cmd {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "daemon")]
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
async fn handle_daemon_end(
|
async fn handle_daemon_end(
|
||||||
settings: &Settings,
|
settings: &Settings,
|
||||||
@ -543,6 +545,7 @@ impl Cmd {
|
|||||||
pub async fn run(self, settings: &Settings) -> Result<()> {
|
pub async fn run(self, settings: &Settings) -> Result<()> {
|
||||||
let context = current_context();
|
let context = current_context();
|
||||||
|
|
||||||
|
#[cfg(feature = "daemon")]
|
||||||
// Skip initializing any databases for start/end, if the daemon is enabled
|
// Skip initializing any databases for start/end, if the daemon is enabled
|
||||||
if settings.daemon.enabled {
|
if settings.daemon.enabled {
|
||||||
match self {
|
match self {
|
||||||
|
Loading…
Reference in New Issue
Block a user