1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-07 17:24:17 +00:00

feat: log cleanup operations for troubleshooting

This commit is contained in:
tw93
2026-01-26 15:22:07 +08:00
parent e0aba780c8
commit 8c4cd7f82e
7 changed files with 267 additions and 119 deletions

View File

@@ -374,6 +374,8 @@ cleanup() {
wait "$sudo_keepalive_pid" 2> /dev/null || true
sudo_keepalive_pid=""
fi
# Log session end
log_operation_session_end "uninstall" "${files_cleaned:-0}" "${total_size_cleaned:-0}"
show_cursor
exit "${1:-0}"
}
@@ -381,6 +383,10 @@ cleanup() {
trap cleanup EXIT INT TERM
main() {
# Set current command for operation logging
export MOLE_CURRENT_COMMAND="uninstall"
log_operation_session_start "uninstall"
local force_rescan=false
# Global flags
for arg in "$@"; do