mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix illegible FileNotFoundError occurrences when git isn't in path. (#6)
* Update git_helper.py * Update git_helper.py * Update git_helper.py
This commit is contained in:
parent
59d31a87e5
commit
028fcaa2d3
1 changed files with 10 additions and 6 deletions
|
|
@ -49,9 +49,6 @@ def update_submodules():
|
|||
if os.path.isfile("DISABLE_SUBMODULE_AUTOUPDATE"):
|
||||
return
|
||||
|
||||
if shutil.which("git") is None:
|
||||
raise FileNotFoundError("git not found in PATH")
|
||||
|
||||
# If the status doesn't match, force VS to reload the solution.
|
||||
# status = run_command(["git", "submodule", "status"], capture=True)
|
||||
run_command(["git", "submodule", "update", "--init", "--recursive"])
|
||||
|
|
@ -112,12 +109,19 @@ def check_for_zip_download():
|
|||
"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)
|
||||
"https://docs.spacestation14.com/en/general-development/setup/server-hosting-tutorial.html")
|
||||
exit(1)
|
||||
|
||||
def check_path_for_git():
|
||||
"""
|
||||
Check git is invokable before trying to invoke it.
|
||||
"""
|
||||
if shutil.which("git") is None:
|
||||
print("git not found in PATH. Ensure git is installed and in PATH and run this program again!")
|
||||
exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_path_for_git()
|
||||
check_for_zip_download()
|
||||
install_hooks()
|
||||
update_submodules()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue