mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-15 07:24:32 +02: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:
@@ -30,11 +30,6 @@ var updateCmd = &cobra.Command{
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
mcVersion, err := pack.GetMCVersion()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
var singleUpdatedName string
|
||||
if viper.GetBool("update.all") {
|
||||
@@ -70,7 +65,7 @@ var updateCmd = &cobra.Command{
|
||||
updaterPointerMap := make(map[string][]*core.Mod)
|
||||
updaterCachedStateMap := make(map[string][]interface{})
|
||||
for k, v := range updaterMap {
|
||||
checks, err := core.Updaters[k].CheckUpdate(v, mcVersion, pack)
|
||||
checks, err := core.Updaters[k].CheckUpdate(v, pack)
|
||||
if err != nil {
|
||||
// TODO: do we return err code 1?
|
||||
fmt.Printf("Failed to check updates for %s: %s\n", k, err.Error())
|
||||
@@ -148,7 +143,7 @@ var updateCmd = &cobra.Command{
|
||||
}
|
||||
updaterFound = true
|
||||
|
||||
check, err := updater.CheckUpdate([]core.Mod{modData}, mcVersion, pack)
|
||||
check, err := updater.CheckUpdate([]core.Mod{modData}, pack)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
|
Reference in New Issue
Block a user