Should no longer try to update if launched outside it's git directory.

This commit is contained in:
Storm Dragon 2023-09-02 19:11:39 -04:00
parent 6d21a91df9
commit 35a7907d72

View File

@ -75,6 +75,9 @@ check_news() {
# Automatic update function # Automatic update function
update() { update() {
if ! [[ -d ".git" ]]; then
return
fi
local url="$(git ls-remote --get-url)" local url="$(git ls-remote --get-url)"
if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then if [[ "$url" =~ ^ssh://|git@|gitea@ ]] || [[ -z "$url" ]]; then
return return