Skip to content

Commit

Permalink
Fixing #236
Browse files Browse the repository at this point in the history
  • Loading branch information
mindstorm38 committed Dec 3, 2024
1 parent 0bf677f commit 9897920
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ __pycache__
# Do not keep tests and coverage results
.pytest_cache
.coverage

# To avoid cluttering when switching branch with 'rust-rewrite' branch.
/rust
20 changes: 10 additions & 10 deletions portablemc/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,16 @@ def _resolve_libraries(self, watcher: Watcher) -> None:
if minecraft_arch_bits is not None:
spec.classifier = spec.classifier.replace("${arch}", str(minecraft_arch_bits))

# Changed in 4.3.1, rules are checked after natives
rules = library.get("rules")
if rules is not None:

if not isinstance(rules, list):
raise ValueError(f"metadata: /libraries/{library_idx}/rules must be a list")

if not interpret_rule(rules, self._features, f"metadata: /libraries/{library_idx}/rules"):
continue

# Create a wildcard copy of the spec without version, because we don't
# want to match against version, regardless of its version, a library
# should not be added twice.
Expand All @@ -656,16 +666,6 @@ def _resolve_libraries(self, watcher: Watcher) -> None:
continue
unique_specs.add(spec_wild)

# Changed in 4.3.1, rules are checked after natives
rules = library.get("rules")
if rules is not None:

if not isinstance(rules, list):
raise ValueError(f"metadata: /libraries/{library_idx}/rules must be a list")

if not interpret_rule(rules, self._features, f"metadata: /libraries/{library_idx}/rules"):
continue

lib_entry: Optional[DownloadEntry] = None

# Avoids ready downloading if a fix is being used, in such case we'll use
Expand Down

0 comments on commit 9897920

Please sign in to comment.