summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tedge/Cargo.toml5
-rw-r--r--tedge/src/cli.rs1
-rw-r--r--tedge/src/lib.rs2
3 files changed, 7 insertions, 1 deletions
diff --git a/tedge/Cargo.toml b/tedge/Cargo.toml
index 9b89b2f2..5fc2d394 100644
--- a/tedge/Cargo.toml
+++ b/tedge/Cargo.toml
@@ -31,7 +31,7 @@ termimad = "0.20.1"
term_size = "0.3.2"
owo-colors = "3.4.0"
textwrap = "0.15.0"
-bugreport = "0.5.0"
+bugreport = { version = "0.5.0", optional = true }
tedge_api = { path = "../crates/core/tedge_api" }
tedge_core = { path = "../crates/core/tedge_core" }
@@ -52,6 +52,7 @@ plugin_notification = { path = "../plugins/plugin_notification", optional = true
[features]
default = [
+ "bugreport",
"builtin_plugin_avg",
"builtin_plugin_log",
"builtin_plugin_sysstat",
@@ -61,6 +62,8 @@ default = [
"builtin_plugin_notification",
]
+bugreport = [ "dep:bugreport" ]
+
builtin_plugin_avg = ["plugin_avg"]
builtin_plugin_log = ["plugin_log"]
builtin_plugin_sysstat = ["plugin_sysstat"]
diff --git a/tedge/src/cli.rs b/tedge/src/cli.rs
index 63730ccc..e1abaa21 100644
--- a/tedge/src/cli.rs
+++ b/tedge/src/cli.rs
@@ -64,6 +64,7 @@ pub enum CliCommand {
plugin_name: Option<String>,
},
+ #[cfg(feature = "bugreport")]
#[clap(name = "bugreport")]
BugReport,
}
diff --git a/tedge/src/lib.rs b/tedge/src/lib.rs
index bf8482da..b20bff9c 100644
--- a/tedge/src/lib.rs
+++ b/tedge/src/lib.rs
@@ -63,6 +63,8 @@ pub async fn run_app(args: crate::cli::Cli, registry: Registry) -> miette::Resul
Ok(())
}
+
+ #[cfg(feature = "bugreport")]
cli::CliCommand::BugReport => {
use bugreport::collector::*;
bugreport::bugreport!()