Fixed a few errors
This commit is contained in:
parent
0788aca862
commit
ef4c683ed1
@ -29,21 +29,24 @@ func InstallMod(pkg string) {
|
||||
buffer += blue("downloaded")
|
||||
}
|
||||
|
||||
fmt.Println(deps)
|
||||
dependencies := []string{}
|
||||
for _, d := range deps {
|
||||
dependency := tools.ExposeModString(d)
|
||||
|
||||
// Prevents duplication within this install, overall duplication would require a buffer
|
||||
if !utils.ExistsInArray(dependencies, d) {
|
||||
if dependency != "bbepis-BepInExPack" && dependency != "tristanmcpherson-R2API" {
|
||||
dependencies = append(dependencies, d)
|
||||
dependencies = append(dependencies, dependency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(buffer)
|
||||
fmt.Println("> Resolving dependencies...")
|
||||
for _, d := range dependencies {
|
||||
InstallMod(d)
|
||||
}
|
||||
|
||||
fmt.Println(buffer)
|
||||
}
|
||||
|
||||
// RemoveMod is a CLI frontend for tools.RemoveMod
|
||||
|
@ -34,6 +34,11 @@ func DownloadMod(depString string) (int, string, []string) {
|
||||
if status != 0 {
|
||||
return 3, "not_found", deps
|
||||
}
|
||||
|
||||
for _, dep := range mod.Versions[0].Dependencies {
|
||||
deps = append(deps, dep)
|
||||
}
|
||||
|
||||
downloadURL := mod.Versions[0].DownloadURL
|
||||
|
||||
modName := sysinfo.ProgDir + "/dl/" + depString + ".zip"
|
||||
@ -66,10 +71,6 @@ func DownloadMod(depString string) (int, string, []string) {
|
||||
log.Println(unzip)
|
||||
utils.CheckErr(err)
|
||||
|
||||
for _, dep := range mod.Versions[0].Dependencies {
|
||||
deps = append(deps, dep)
|
||||
}
|
||||
|
||||
return status, modver, deps
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user