adding api key

This commit is contained in:
Joey Eamigh
2023-06-21 21:31:45 -04:00
parent 1e9379636d
commit b885e5e3b3

View File

@@ -63,9 +63,12 @@ def mods():
cprint("downloading mods. this may take a while, please wait.", "green") cprint("downloading mods. this may take a while, please wait.", "green")
my_env = os.environ.copy()
my_env["CURSEFORGE_API_KEY"] = "$2a$10$QbCxI6f4KxEs50QKwE2piu1t6oOA8ayOw27H9N/eaH3Sdp5NTWwvO"
os.makedirs(os.path.join(INSTANCE_DIR, "mods")) os.makedirs(os.path.join(INSTANCE_DIR, "mods"))
if OS != "win32": if OS != "win32":
subprocess.run(["java", "-jar", "downloader.jar", ".", "mods"]) subprocess.run(["java", "-jar", "downloader.jar", ".", "mods"], env=my_env)
else: else:
subprocess.run( subprocess.run(
[ [
@@ -74,7 +77,8 @@ def mods():
"downloader.jar", "downloader.jar",
".", ".",
"mods", "mods",
] ],
env=my_env,
) )
for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")): for file in glob.glob(os.path.join(INSTANCE_DIR, ".minecraft", "mods", "*")):