mirror of
https://github.com/packwiz/packwiz.git
synced 2025-11-18 17:14:32 +01:00
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:
@@ -411,7 +411,8 @@ func createFileMeta(project *modrinthApi.Project, version *modrinthApi.Version,
|
|||||||
|
|
||||||
side := getSide(project)
|
side := getSide(project)
|
||||||
if side == "" {
|
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)
|
algorithm, hash := getBestHash(file)
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ var installCmd = &cobra.Command{
|
|||||||
modMeta := core.Mod{
|
modMeta := core.Mod{
|
||||||
Name: args[0],
|
Name: args[0],
|
||||||
FileName: filename,
|
FileName: filename,
|
||||||
|
Side: core.UniversalSide,
|
||||||
Download: core.ModDownload{
|
Download: core.ModDownload{
|
||||||
URL: args[1],
|
URL: args[1],
|
||||||
HashFormat: "sha256",
|
HashFormat: "sha256",
|
||||||
|
|||||||
Reference in New Issue
Block a user