From 3f2b7a0b7859f576625a16bc435bdb33a8395ef2 Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sat, 24 Aug 2024 21:01:42 +0200 Subject: [PATCH] fix(build): allow to compile without tui feature (#1208) closes #1206 --- src/commands/snapshots.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/snapshots.rs b/src/commands/snapshots.rs index b07b6f3..d88c0cc 100644 --- a/src/commands/snapshots.rs +++ b/src/commands/snapshots.rs @@ -17,6 +17,7 @@ use rustic_core::{ SnapshotGroupCriterion, }; +#[cfg(feature = "tui")] use super::tui; /// `snapshot` subcommand @@ -47,6 +48,7 @@ pub(crate) struct SnapshotCmd { #[clap(long, conflicts_with_all = &["long", "json"])] all: bool, + #[cfg(feature = "tui")] /// Run in interactive UI mode #[clap(long, short)] pub interactive: bool, @@ -63,6 +65,7 @@ impl Runnable for SnapshotCmd { impl SnapshotCmd { fn inner_run(&self) -> Result<()> { + #[cfg(feature = "tui")] if self.interactive { return tui::run(self.group_by); }