Skip to content

Commit e617ed2

Browse files
jason-costellotw93
andauthored
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 <hitw93@gmail.com>
1 parent 06d2a3d commit e617ed2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/clean/app_caches.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,6 @@ clean_remote_desktop() {
240240
# Main entry for GUI app cleanup.
241241
clean_user_gui_applications() {
242242
stop_section_spinner
243-
clean_xcode_tools
244-
clean_code_editors
245243
clean_communication_apps
246244
clean_dingtalk
247245
clean_ai_apps

tests/clean_app_caches.bats

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,17 @@ safe_clean() { :; }
8484
clean_xcode_tools() { echo "xcode"; }
8585
clean_code_editors() { echo "editors"; }
8686
clean_communication_apps() { echo "comm"; }
87+
clean_dingtalk() { echo "dingtalk"; }
88+
clean_ai_apps() { echo "ai"; }
8789
clean_user_gui_applications
8890
EOF
8991

9092
[ "$status" -eq 0 ]
91-
[[ "$output" == *"xcode"* ]]
92-
[[ "$output" == *"editors"* ]]
93+
[[ "$output" != *"xcode"* ]]
94+
[[ "$output" != *"editors"* ]]
9395
[[ "$output" == *"comm"* ]]
96+
[[ "$output" == *"dingtalk"* ]]
97+
[[ "$output" == *"ai"* ]]
9498
}
9599

96100
@test "clean_ai_apps calls expected caches" {

0 commit comments

Comments
 (0)