diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-22 21:18:02 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-22 21:18:02 +0200 |
| commit | c9ea93f0b415dc3ea8c86ec0f5c5862c7b593a00 (patch) | |
| tree | 9b5a9d3b48ecacb2deecf47358f931e1db497a8a /crates/daemon | |
| parent | crates/turtle/list: Restore the history listing code from atuin (diff) | |
| download | atuin-c9ea93f0b415dc3ea8c86ec0f5c5862c7b593a00.zip | |
treewide: Fix most `cargo check` warnings
The remaining ones, require actual work to resolve.
Diffstat (limited to '')
| -rw-r--r-- | crates/daemon/src/main.rs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/crates/daemon/src/main.rs b/crates/daemon/src/main.rs index 8fd3c119..d157d075 100644 --- a/crates/daemon/src/main.rs +++ b/crates/daemon/src/main.rs @@ -43,21 +43,6 @@ enum Cmd { #[tokio::main] async fn main() -> Result<()> { - if let Err(e) = tracing_subscriber::fmt() - .with_file(true) - .with_line_number(true) - .with_level(true) - .without_time() - .with_env_filter( - EnvFilter::builder() - .from_env_lossy() - .add_directive("turtle_daemon=debug".parse().unwrap()), - ) - .try_init() - { - eprintln!("failed to initialize logging: {e}"); - } - let settings = Settings::new().wrap_err("could not load client settings")?; if !settings.paths_ok() { bail!("Failed to verify all paths :("); @@ -70,7 +55,25 @@ async fn main() -> Result<()> { let sqlite_store = SqliteStore::new(record_store_path, settings.local_timeout).await?; match Cmd::parse() { - Cmd::Start { show_logs, .. } => boot(settings, sqlite_store, history_db).await, + Cmd::Start { show_logs, .. } => { + if show_logs + && let Err(e) = tracing_subscriber::fmt() + .with_file(true) + .with_line_number(true) + .with_level(true) + .without_time() + .with_env_filter( + EnvFilter::builder() + .from_env_lossy() + .add_directive("turtle_daemon=debug".parse().unwrap()), + ) + .try_init() + { + eprintln!("failed to initialize logging: {e}"); + } + + boot(settings, sqlite_store, history_db).await + } } } |
