diff --git a/linux-game-manager.sh b/linux-game-manager.sh index a442d9d..887089d 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -47,7 +47,12 @@ export DIALOGOPTS='--no-lines --visit-items' # Check for updates check_update() { - local branch="$(git rev-parse --abbrev-ref HEAD)" + local url="$(git ls-remote --get-url)" + if [[ "$url" =~ ^ssh://|git@ ]] || [[ -z "$url" ]]; then + return + fi + git fetch + local branch="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" local localSha="$(git rev-parse origin/${branch})" local remoteSha="$(git rev-parse refs/remotes/origin/${branch})" if [[ "${localSha}" == "${remoteSha}" ]]; then