1
0

Allow duplicate version numbers, fix version sorting, edit validators (#414)

This commit is contained in:
Geometrically
2022-08-06 17:44:16 -07:00
committed by GitHub
parent 411b8e3cb6
commit 33988ed3fb
7 changed files with 9 additions and 72 deletions

View File

@@ -93,11 +93,11 @@ impl super::Validator for VelocityValidator {
&self,
archive: &mut ZipArchive<Cursor<bytes::Bytes>>,
) -> Result<ValidationResult, ValidationError> {
archive.by_name("velocity-plugin.json").map_err(|_| {
ValidationError::InvalidInput(
"No velocity-plugin.json present for plugin file.".into(),
)
})?;
if archive.by_name("velocity-plugin.json").is_err() {
return Ok(ValidationResult::Warning(
"No velocity-plugin.json present for plugin file.",
));
}
Ok(ValidationResult::Pass)
}