From 8743236acb161342a2d247015cefb8fedf8e6bbe Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Thu, 5 Sep 2019 02:32:30 -0400 Subject: [PATCH] Add Flatpak and snap to Step::System (#218) This makes them easier to disable --- src/main.rs | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0a6189de..587f5f4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -396,18 +396,20 @@ fn run() -> Result<(), Error> { #[cfg(target_os = "linux")] { - execute( - &mut report, - "Flatpak", - || linux::flatpak_update(run_type), - config.no_retry(), - )?; - execute( - &mut report, - "snap", - || linux::run_snap(sudo.as_ref(), run_type), - config.no_retry(), - )?; + if config.should_run(Step::System) { + execute( + &mut report, + "Flatpak", + || linux::flatpak_update(run_type), + config.no_retry(), + )?; + execute( + &mut report, + "snap", + || linux::run_snap(sudo.as_ref(), run_type), + config.no_retry(), + )?; + } } if let Some(commands) = config.commands() {