fix(build): allow to compile without tui feature (#1208)

closes #1206
This commit is contained in:
aawsome 2024-08-24 21:01:42 +02:00 committed by GitHub
parent f72285d81d
commit 3f2b7a0b78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}