Fix problems with sides in packwiz mr add and packwiz url add (#327)

* Assume "url" files are UniversalSide

Signed-off-by: unilock <unilock@fennet.rentals>

* Assume Modrinth projects with no sides marked are UniversalSide

Signed-off-by: unilock <unilock@fennet.rentals>

---------

Signed-off-by: unilock <unilock@fennet.rentals>
This commit is contained in:
Katherine
2025-08-10 16:22:11 -04:00
committed by GitHub
parent be94495d34
commit 78c6a77c78
2 changed files with 3 additions and 1 deletions

View File

@@ -411,7 +411,8 @@ func createFileMeta(project *modrinthApi.Project, version *modrinthApi.Version,
side := getSide(project)
if side == "" {
return errors.New("version doesn't have a side that's supported. Server: " + *project.ServerSide + " Client: " + *project.ClientSide)
fmt.Println("Warning: Project doesn't have a side that's supported; assuming universal. Server: " + *project.ServerSide + " Client: " + *project.ClientSide)
side = core.UniversalSide
}
algorithm, hash := getBestHash(file)