Skip update checks if in detached state. Lesson learned from 2025 tag.

This commit is contained in:
Storm Dragon
2025-11-23 20:15:34 -05:00
parent 0a22d007de
commit 6a16e595a9

View File

@@ -26,6 +26,10 @@ update() {
if ! [[ -d ".git" ]]; then
return
fi
# Check if we're in a detached HEAD state
if ! git symbolic-ref -q HEAD &> /dev/null; then
return
fi
local url="$(git ls-remote --get-url)"
if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then
return