]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
when fixing configs, bail out if the repo is somehow invalid
[xonotic/xonotic.git] / all
diff --git a/all b/all
index ce391b21e617a0d9dfbe16ee4b28f48febd36c95..29928197ae8b4fdd86e78f6da91f23982c8b0e6d 100755 (executable)
--- a/all
+++ b/all
@@ -380,6 +380,10 @@ fix_upstream_rebase_mergefail()
 
 fix_git_config()
 {
+       if ! [ -d ".git" ]; then
+               $ECHO "Not a git repository. Bailing out to not cause damage."
+               exit 1
+       fi
        verbose git config remote.origin.url "$1"
        if [ -n "$2" ]; then
                verbose git config remote.origin.pushurl "$2"