mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-15 03:25:01 -05:00
only allow mods to have dependencies with version any or moreeq
This commit is contained in:
parent
beeb7ca1f8
commit
a8901c350a
1 changed files with 11 additions and 0 deletions
|
@ -225,6 +225,17 @@ Result<ModMetadata> ModMetadata::Impl::createFromSchemaV010(ModJson const& rawJs
|
|||
obj.has("importance").into(dependency.importance);
|
||||
obj.checkUnknownKeys();
|
||||
|
||||
if (
|
||||
dependency.version.getComparison() != VersionCompare::MoreEq &&
|
||||
dependency.version.getComparison() != VersionCompare::Any
|
||||
) {
|
||||
return Err(
|
||||
"[mod.json].dependencies.{}.version must be either a more-than "
|
||||
"comparison for a specific version or a wildcard for any version",
|
||||
dependency.id
|
||||
);
|
||||
}
|
||||
|
||||
// if (isDeprecatedIDForm(dependency.id)) {
|
||||
// log::warn(
|
||||
// "Dependency ID '{}' will be rejected in the future - "
|
||||
|
|
Loading…
Reference in a new issue