add error handling to windows install branch
This commit is contained in:
parent
4176263cb1
commit
98c1324af0
10
installer.py
10
installer.py
@ -173,7 +173,15 @@ if platform.system() == "Linux":
|
|||||||
elif platform.system() == "Windows":
|
elif platform.system() == "Windows":
|
||||||
print("Operating system detected: Windows")
|
print("Operating system detected: Windows")
|
||||||
|
|
||||||
os.chdir("AppData/Roaming/.minecraft")
|
try:
|
||||||
|
os.chdir("AppData/Roaming/.minecraft")
|
||||||
|
except:
|
||||||
|
print("[ERR!] Fatal: Minecraft directory not found. (Is Minecraft installed?)")
|
||||||
|
print("[ERR!] Fatal: This window will close in 10 seconds.")
|
||||||
|
print
|
||||||
|
time.sleep(10)
|
||||||
|
pass
|
||||||
|
|
||||||
mcfolder = str(Path.cwd())
|
mcfolder = str(Path.cwd())
|
||||||
print("[INFO]: Changed current working directory to '" + str(mcfolder) + "'")
|
print("[INFO]: Changed current working directory to '" + str(mcfolder) + "'")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user