1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 19:09:43 +00:00

fix: replace pgrep with tmutil status for more accurate Time Machine backup detection and add new tests for this logic.

This commit is contained in:
Tw93
2025-12-28 20:10:16 +08:00
parent 4a626f9337
commit ff6f288c9b
2 changed files with 96 additions and 2 deletions

View File

@@ -213,8 +213,8 @@ clean_time_machine_failed_backups() {
return 0
fi
# Skip if backup is running
if pgrep -x "backupd" > /dev/null 2>&1; then
# Skip if backup is running (check actual Running status, not just daemon existence)
if tmutil status 2>/dev/null | grep -q "Running = 1"; then
if [[ "$spinner_active" == "true" ]]; then
stop_section_spinner
fi