From 4d04a45ef097a9249e88a29bbb8986783a88a2dc Mon Sep 17 00:00:00 2001 From: l5y <220195275+l5yth@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:57:00 +0100 Subject: [PATCH] remove installed test artifact --- src/app/tui/workers.rs | 11 +++++++++-- src/cli.rs | 7 ------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/tui/workers.rs b/src/app/tui/workers.rs index dc80e84..c5657d4 100644 --- a/src/app/tui/workers.rs +++ b/src/app/tui/workers.rs @@ -49,10 +49,17 @@ pub fn spawn_refresh_worker(config: Config, previous_rows: Vec) -> Rece let (tx, rx) = mpsc::channel(); thread::spawn(move || { let fetch_all = should_fetch_all(&config); + let include_unit_files = config.load_filter == "all" + && config.active_filter == "all" + && config.sub_filter == "all"; let units = match fetch_services(config.scope, fetch_all) .and_then(|units| { - let unit_files = fetch_unit_files(config.scope)?; - Ok(merge_unit_file_entries(units, unit_files)) + if include_unit_files { + let unit_files = fetch_unit_files(config.scope)?; + Ok(merge_unit_file_entries(units, unit_files)) + } else { + Ok(units) + } }) .map(|u| filter_services(u, &config)) { diff --git a/src/cli.rs b/src/cli.rs index fefe0b1..2ee536e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -323,7 +323,6 @@ Options: final-watchdog, cleaning) --sort Sort order for the list view (auto, name, status) auto (default): status when all filters are 'all', name otherwise - -i, --installed Include unit-file-only services not loaded by systemd -u, --user Show units in user instead of system scope -h, --help Show this help text -v, --version Show version and copyright" @@ -731,12 +730,6 @@ mod tests { } } - #[test] - fn usage_mentions_installed_flag() { - assert!(usage().contains("--installed")); - assert!(usage().contains("-i, --installed")); - } - #[test] fn parse_args_rejects_all_mixed_with_equals_filters() { let err = parse_args(vec!["lsu", "--all", "--sub=running"])