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

Tweak macOS update detection and bump version

This commit is contained in:
Tw93
2025-12-29 15:13:37 +08:00
parent 694c55f73b
commit beaaa98c9b
2 changed files with 6 additions and 4 deletions

View File

@@ -265,9 +265,11 @@ check_macos_update() {
fi
# Prefer avoiding false negatives: if the system indicates updates are pending,
# only clear the flag when softwareupdate explicitly reports no updates.
if [[ $sw_status -eq 0 && -n "$sw_output" ]] && echo "$sw_output" | grep -qE '^\s*No new software available\s*\.?\s*$'; then
updates_available="false"
# only clear the flag when softwareupdate returns a list without any update entries.
if [[ $sw_status -eq 0 && -n "$sw_output" ]]; then
if ! echo "$sw_output" | grep -qE '^[[:space:]]*\*'; then
updates_available="false"
fi
fi
fi