diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-09-19 11:04:08 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-09-19 11:04:08 +0200 |
commit | 8d22558ba7b367b6523fca2eee4047c0bc19a338 (patch) | |
tree | 89f30552a8e9d0947c3bd814222b979b8bf365a7 | |
parent | 2b0096920b10b271498400ebc362c10b3684882a (diff) |
Make "bugreport" optionalpost-merge/tedge-bugreport
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | tedge/Cargo.toml | 5 | ||||
-rw-r--r-- | tedge/src/cli.rs | 1 | ||||
-rw-r--r-- | tedge/src/lib.rs | 2 |
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!() |