diff options
author | Conrad Ludgate <conrad.ludgate@truelayer.com> | 2022-04-22 21:14:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 20:14:23 +0000 |
commit | 7436e4ff651b64d4019a59d04c30c414ae220403 (patch) | |
tree | 3d5e35df1bce075ae04be63d76f9edc8cc17c6cb /src/command/client/history.rs | |
parent | 508d4f476157384b0d454bee3dd6e9256560561b (diff) |
feature-flags (#328)
* use feature flags
* fmt
* fix features
* update ci
* fmt
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Diffstat (limited to 'src/command/client/history.rs')
-rw-r--r-- | src/command/client/history.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/command/client/history.rs b/src/command/client/history.rs index 994cbfd5..4f96c444 100644 --- a/src/command/client/history.rs +++ b/src/command/client/history.rs @@ -9,6 +9,8 @@ use tabwriter::TabWriter; use atuin_client::database::{current_context, Database}; use atuin_client::history::History; use atuin_client::settings::Settings; + +#[cfg(feature = "sync")] use atuin_client::sync; #[derive(Subcommand)] @@ -143,8 +145,13 @@ impl Cmd { db.update(&h).await?; if settings.should_sync()? { - debug!("running periodic background sync"); - sync::sync(settings, false, db).await?; + #[cfg(feature = "sync")] + { + debug!("running periodic background sync"); + sync::sync(settings, false, db).await?; + } + #[cfg(not(feature = "sync"))] + debug!("not compiled with sync support"); } else { debug!("sync disabled! not syncing"); } |