From e617ed2e761d165069592cae4de6c1572ee08104 Mon Sep 17 00:00:00 2001 From: Jason Costello Date: Wed, 18 Mar 2026 11:25:49 -0500 Subject: [PATCH] Fix: Removed duplicate calls to clean_xcode_tools and clean_code_editors (#593) * removed duplicate calls to clean_xcode_tools and clean_code_editors in lib/clean/app_caches.sh clean_user_gui_application() was making calls to clean_xcode_tools and clean_code_editors. in lib/clean/dev.sh clean_xcode_tools and clean_code_editors was also being called, causing the duplication when executing the clean command. removed the calls from lib/clean/app_caches.sh clean_user_gui_application since these two calls are developer focused. * test: cover removed developer app calls --------- Co-authored-by: Tw93 --- lib/clean/app_caches.sh | 2 -- tests/clean_app_caches.bats | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/clean/app_caches.sh b/lib/clean/app_caches.sh index d99ebea..5de558c 100644 --- a/lib/clean/app_caches.sh +++ b/lib/clean/app_caches.sh @@ -240,8 +240,6 @@ clean_remote_desktop() { # Main entry for GUI app cleanup. clean_user_gui_applications() { stop_section_spinner - clean_xcode_tools - clean_code_editors clean_communication_apps clean_dingtalk clean_ai_apps diff --git a/tests/clean_app_caches.bats b/tests/clean_app_caches.bats index dee061f..ad47377 100644 --- a/tests/clean_app_caches.bats +++ b/tests/clean_app_caches.bats @@ -84,13 +84,17 @@ safe_clean() { :; } clean_xcode_tools() { echo "xcode"; } clean_code_editors() { echo "editors"; } clean_communication_apps() { echo "comm"; } +clean_dingtalk() { echo "dingtalk"; } +clean_ai_apps() { echo "ai"; } clean_user_gui_applications EOF [ "$status" -eq 0 ] - [[ "$output" == *"xcode"* ]] - [[ "$output" == *"editors"* ]] + [[ "$output" != *"xcode"* ]] + [[ "$output" != *"editors"* ]] [[ "$output" == *"comm"* ]] + [[ "$output" == *"dingtalk"* ]] + [[ "$output" == *"ai"* ]] } @test "clean_ai_apps calls expected caches" {