diff --git a/.includes/update.sh b/.includes/update.sh index 33fb5d4..7a106bb 100644 --- a/.includes/update.sh +++ b/.includes/update.sh @@ -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