Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Fixed loading default launcher directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tygoee committed Mar 6, 2024
1 parent f6df8fc commit 4584361
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/install/modloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ def __init__(
:param launcher_dir: The launcher dir (ignored if on server side)
"""

self.mc_version = mc_version

# Define the class variables
launcher_dir = install_dir if side == 'server' else launcher_dir

Expand All @@ -413,9 +411,6 @@ def __init__(

# Exit if the launcher hasn't launched once
if not path.isfile(path.join(launcher_dir, 'launcher_profiles.json')) and side == 'client':
print(launcher_dir)
print(path.exists(launcher_dir))
print(path.join(launcher_dir, 'launcher_profiles.json'))
raise FileNotFoundError(
"Launch the launcher once before installing fabric.")

Expand Down
6 changes: 5 additions & 1 deletion tests/install/test_modloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,25 @@


class Modloaders(unittest.TestCase):
@quiet
@cleanup
def test_forge_client(self):
setup_dirs()
forge('1.20.1', '47.1.0', 'client', INSTDIR, LAUNDIR)

@quiet
@cleanup
def test_forge_server(self):
setup_dirs()
forge('1.20.1', '47.1.0', 'server', INSTDIR)

@quiet
@cleanup
def test_fabric_client(self):
setup_dirs()
fabric('1.20.1', '0.14.22', 'client', INSTDIR)
fabric('1.20.1', '0.14.22', 'client', INSTDIR, LAUNDIR)

@quiet
@cleanup
def test_fabric_server(self):
setup_dirs()
Expand Down

0 comments on commit 4584361

Please sign in to comment.