Skip to content

Commit

Permalink
Satisfy suggestions w/ provides as per KSP-CKAN#1234
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Dec 2, 2017
1 parent 15f5f51 commit e69fa33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ConsoleUI/DependencyScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ public bool HaveOptions()
private void generateList(HashSet<string> inst)
{
foreach (string mod in inst) {
CkanModule m = registry.LatestAvailable(mod, manager.CurrentInstance.VersionCriteria());
if (m != null) {
AddDependencies(inst, mod, m.recommends, true);
List<CkanModule> ml = registry.LatestAvailableWithProvides(mod, manager.CurrentInstance.VersionCriteria());
foreach (CkanModule m in ml) {
// Default recommended to install=true only if there's just one recommendation
AddDependencies(inst, mod, m.recommends, ml.Count == 1);
AddDependencies(inst, mod, m.suggests, false);
}
}
Expand Down

0 comments on commit e69fa33

Please sign in to comment.