1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 22:30:08 +00:00

Improve update checks and cleanup UX, add timeout regressions

This commit is contained in:
tw93
2026-03-05 12:00:07 +08:00
parent fbee8da9f7
commit 8e4b8a5e0d
21 changed files with 948 additions and 164 deletions

View File

@@ -790,6 +790,7 @@ load_applications() {
# Cleanup: restore cursor and kill keepalive.
cleanup() {
local exit_code="${1:-$?}"
if [[ "${MOLE_ALT_SCREEN_ACTIVE:-}" == "1" ]]; then
leave_alt_screen
unset MOLE_ALT_SCREEN_ACTIVE
@@ -802,7 +803,7 @@ cleanup() {
# Log session end
log_operation_session_end "uninstall" "${files_cleaned:-0}" "${total_size_cleaned:-0}"
show_cursor
exit "${1:-0}"
exit "$exit_code"
}
trap cleanup EXIT INT TERM
@@ -825,6 +826,22 @@ main() {
"--dry-run" | "-n")
export MOLE_DRY_RUN=1
;;
"--whitelist")
echo "Unknown uninstall option: $arg"
echo "Whitelist management is currently supported by: mo clean --whitelist / mo optimize --whitelist"
echo "Use 'mo uninstall --help' for supported options."
exit 1
;;
-*)
echo "Unknown uninstall option: $arg"
echo "Use 'mo uninstall --help' for supported options."
exit 1
;;
*)
echo "Unknown uninstall argument: $arg"
echo "Use 'mo uninstall --help' for supported options."
exit 1
;;
esac
done