Skip to content

Commit

Permalink
Always get .env from correct dir, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
WarningImHack3r committed Jun 24, 2023
1 parent 5941ce2 commit 5354cb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mods_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from curseforge_api import get_minecraft_versions
from utils import Color, ModLoader, SearchMethod, SearchWebsite

VERSION = "1.1.3"
VERSION = "1.1.4"


def diff_between_files(file1: str, file2: str) -> dict:
Expand Down Expand Up @@ -137,9 +137,10 @@ def leave(error: bool = False, message: str = None, silent: bool = False):

if __name__ == "__main__":
# Check if the CURSEFORGE_API_KEY exists in .env
if os.path.exists(".env"):
env_path = os.path.join(os.path.dirname(sys.argv[0]), ".env")
if os.path.exists(env_path):
env_key_found = False
for line in open(".env"):
for line in open(env_path):
if line.startswith("CURSEFORGE_API_KEY"):
env_key_found = True
if not line.split("=")[1].strip():
Expand Down

0 comments on commit 5354cb8

Please sign in to comment.