mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-27 09:24:31 +01:00
Prefer game versions according to acceptable versions list (fixes #181)
The acceptable versions list should now be specified in order of preference, where the last version is the most preferable Minecraft version
This commit is contained in:
@@ -142,14 +142,14 @@ func installVersionById(versionId string, versionFilename string, pack core.Pack
|
||||
}
|
||||
|
||||
func installViaSearch(query string, versionFilename string, autoAcceptFirst bool, pack core.Pack, index *core.Index) error {
|
||||
mcVersion, err := pack.GetMCVersion()
|
||||
mcVersions, err := pack.GetSupportedMCVersions()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("Searching Modrinth...")
|
||||
|
||||
results, err := getProjectIdsViaSearch(query, append([]string{mcVersion}, viper.GetStringSlice("acceptable-game-versions")...))
|
||||
results, err := getProjectIdsViaSearch(query, mcVersions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user