mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-14 06:54:32 +02:00
Update loader/mc versions from imported CF packs (fixes #70)
also refactored internal modloader handling!
This commit is contained in:
@@ -166,6 +166,16 @@ var importCmd = &cobra.Command{
|
||||
},
|
||||
Versions: packImport.Versions(),
|
||||
}
|
||||
} else {
|
||||
for component, version := range packImport.Versions() {
|
||||
packVersion, ok := pack.Versions[component]
|
||||
if !ok {
|
||||
fmt.Println("Set " + core.ComponentToFriendlyName(component) + " version to " + version)
|
||||
} else if packVersion != version {
|
||||
fmt.Println("Set " + core.ComponentToFriendlyName(component) + " version to " + version + " (previously " + version + ")")
|
||||
}
|
||||
pack.Versions[component] = version
|
||||
}
|
||||
}
|
||||
index, err := pack.LoadIndex()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user