]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Added warning when attempting to run RUN_THIS on a zip repo download (Attempt 2)...
authorMyra <vasilis@pikachu.systems>
Tue, 29 Apr 2025 21:51:21 +0000 (22:51 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Apr 2025 21:51:21 +0000 (23:51 +0200)
* Added warning when attempting to run RUN_THIS on a zip repo download

* Fix it actually

* Update git_helper.py

BuildChecker/git_helper.py

index becd4506e820df62b1f73a3b97c6295c4aa3953e..96a7bdae2ab1a61111316dd7913a7d5e7cd86acb 100644 (file)
@@ -5,6 +5,7 @@ import subprocess
 import sys
 import os
 import shutil
+import time
 from pathlib import Path
 from typing import List
 
@@ -104,7 +105,21 @@ def reset_solution():
     with SOLUTION_PATH.open("w") as f:
         f.write(content)
 
+def check_for_zip_download():
+    # Check if .git exists,
+    cur_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+    if not os.path.isdir(os.path.join(cur_dir, ".git")):
+        print("It appears that you downloaded this repository directly from GitHub. (Using the .zip download option) \n"
+              "When downloading straight from GitHub, it leaves out important information that git needs to function. "
+              "Such as information to download the engine or even the ability to even be able to create contributions. \n"
+              "Please read and follow https://docs.spacestation14.com/en/general-development/setup/setting-up-a-development-environment.html \n"
+              "If you just want a Sandbox Server, you are following the wrong guide! You can download a premade server following the instructions here:"
+              "https://docs.spacestation14.com/en/general-development/setup/server-hosting-tutorial.html \n"
+              "Closing automatically in 30 seconds.")
+        time.sleep(30)
+        exit(1)
 
 if __name__ == '__main__':
+    check_for_zip_download()
     install_hooks()
     update_submodules()