mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-26 05:27:21 +02:00
fixed crash, when mods have no basemodversion defined
This commit is contained in:
parent
0b6fc19e51
commit
72eb0c894b
@ -77,6 +77,13 @@ func (modInfoList *ModInfoList) listInstalledMods() error {
|
|||||||
var baseDependency string
|
var baseDependency string
|
||||||
for _, dependency := range modInfo.Dependencies {
|
for _, dependency := range modInfo.Dependencies {
|
||||||
if strings.HasPrefix(dependency, "base") {
|
if strings.HasPrefix(dependency, "base") {
|
||||||
|
splittedDep := strings.Split(dependency, "=")
|
||||||
|
|
||||||
|
if len(splittedDep) == 1 {
|
||||||
|
log.Printf("basemod without version specified!")
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
baseDependency = strings.Split(dependency, "=")[1]
|
baseDependency = strings.Split(dependency, "=")[1]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user