mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 21:04:11 +00:00
Fix handing issue on macOS Sequoia after completing 1 task (#291)
This commit is contained in:
25
mole
25
mole
@@ -82,20 +82,21 @@ check_for_updates() {
|
|||||||
ensure_user_file "$msg_cache"
|
ensure_user_file "$msg_cache"
|
||||||
|
|
||||||
(
|
(
|
||||||
local latest
|
(
|
||||||
|
local latest
|
||||||
|
|
||||||
latest=$(get_latest_version_from_github)
|
latest=$(get_latest_version_from_github)
|
||||||
if [[ -z "$latest" ]]; then
|
if [[ -z "$latest" ]]; then
|
||||||
latest=$(get_latest_version)
|
latest=$(get_latest_version)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$latest" && "$VERSION" != "$latest" && "$(printf '%s\n' "$VERSION" "$latest" | sort -V | head -1)" == "$VERSION" ]]; then
|
if [[ -n "$latest" && "$VERSION" != "$latest" && "$(printf '%s\n' "$VERSION" "$latest" | sort -V | head -1)" == "$VERSION" ]]; then
|
||||||
printf "\nUpdate available: %s → %s, run %smo update%s\n\n" "$VERSION" "$latest" "$GREEN" "$NC" > "$msg_cache"
|
printf "\nUpdate available: %s → %s, run %smo update%s\n\n" "$VERSION" "$latest" "$GREEN" "$NC" > "$msg_cache"
|
||||||
else
|
else
|
||||||
echo -n > "$msg_cache"
|
echo -n > "$msg_cache"
|
||||||
fi
|
fi
|
||||||
) &
|
) > /dev/null 2>&1 < /dev/null &
|
||||||
disown 2> /dev/null || true
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
show_update_notification() {
|
show_update_notification() {
|
||||||
|
|||||||
Reference in New Issue
Block a user