mirror of
https://github.com/tw93/Mole.git
synced 2026-02-08 16:09:22 +00:00
Improve spinner subprocess and trap cleanup handling
This commit is contained in:
@@ -241,12 +241,9 @@ clean_remote_desktop() {
|
||||
|
||||
# Main function to clean all user GUI applications
|
||||
clean_user_gui_applications() {
|
||||
start_section_spinner "Scanning app caches..."
|
||||
|
||||
clean_xcode_tools
|
||||
|
||||
stop_section_spinner
|
||||
|
||||
clean_xcode_tools
|
||||
clean_code_editors
|
||||
clean_communication_apps
|
||||
clean_dingtalk
|
||||
|
||||
@@ -255,7 +255,10 @@ start_inline_spinner() {
|
||||
|
||||
if [[ -t 1 ]]; then
|
||||
(
|
||||
trap 'exit 0' TERM INT EXIT
|
||||
# Clean exit handler for spinner subprocess
|
||||
cleanup_spinner() { exit 0; }
|
||||
trap cleanup_spinner TERM INT EXIT
|
||||
|
||||
local chars
|
||||
chars="$(mo_spinner_chars)"
|
||||
[[ -z "$chars" ]] && chars="|/-\\"
|
||||
|
||||
Reference in New Issue
Block a user