Should no longer try to update if launched outside it's git directory.
This commit is contained in:
parent
6d21a91df9
commit
35a7907d72
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user