From 78c6a77c78ad35a808c6f25ae77e18807718ab6a Mon Sep 17 00:00:00 2001 From: Katherine Date: Sun, 10 Aug 2025 16:22:11 -0400 Subject: [PATCH] Fix problems with sides in `packwiz mr add` and `packwiz url add` (#327) * Assume "url" files are UniversalSide Signed-off-by: unilock * Assume Modrinth projects with no sides marked are UniversalSide Signed-off-by: unilock --------- Signed-off-by: unilock --- modrinth/install.go | 3 ++- url/install.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modrinth/install.go b/modrinth/install.go index 75b6745..f45c00a 100644 --- a/modrinth/install.go +++ b/modrinth/install.go @@ -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) diff --git a/url/install.go b/url/install.go index e9e38de..22a17cd 100644 --- a/url/install.go +++ b/url/install.go @@ -72,6 +72,7 @@ var installCmd = &cobra.Command{ modMeta := core.Mod{ Name: args[0], FileName: filename, + Side: core.UniversalSide, Download: core.ModDownload{ URL: args[1], HashFormat: "sha256",