mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-21 00:54:31 +02:00
Add a command for changing the acceptable versions (#206)
* feat: add packwiz settings command to allow for changing acceptable versions * Add deduping on the list * Fix typo in comment * Detect out of order list and give the user an option to correct it * Support adding and removing specific versions * Ensure the options aren't nil * Clean up the slice removal boilerplate * Fix usage of slices.Delete
This commit is contained in:
@@ -205,7 +205,7 @@ func installProject(project *modrinthApi.Project, versionFilename string, pack c
|
||||
return fmt.Errorf("failed to get latest version: %v", err)
|
||||
}
|
||||
if latestVersion.ID == nil {
|
||||
return errors.New("mod not available for the configured Minecraft version(s) (use the acceptable-game-versions option to accept more) or loader")
|
||||
return errors.New("mod not available for the configured Minecraft version(s) (use the 'packwiz settings acceptable-versions' command to accept more) or loader")
|
||||
}
|
||||
|
||||
return installVersion(project, latestVersion, versionFilename, pack, index)
|
||||
|
@@ -287,7 +287,7 @@ func getLatestVersion(projectID string, name string, pack core.Pack) (*modrinthA
|
||||
}
|
||||
if len(result) == 0 {
|
||||
// TODO: retry with datapack specified, to determine what the issue is? or just request all and filter afterwards
|
||||
return nil, errors.New("no valid versions found\n\tUse the acceptable-game-versions option to accept more game versions\n\tTo use datapacks, add a datapack loader mod and specify the datapack-folder option with the folder this mod loads datapacks from")
|
||||
return nil, errors.New("no valid versions found\n\tUse the 'packwiz settings acceptable-versions' command to accept more game versions\n\tTo use datapacks, add a datapack loader mod and specify the datapack-folder option with the folder this mod loads datapacks from")
|
||||
}
|
||||
|
||||
// TODO: option to always compare using flexver?
|
||||
|
Reference in New Issue
Block a user