Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArgumentException in ConsoleUI recommendations #2990

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Core/ModuleInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,9 @@ out Dictionary<CkanModule, HashSet<string>> supporters
var candidates = registry.CompatibleModules(ksp.VersionCriteria())
.Where(mod => !registry.IsInstalled(mod.identifier)
&& !toInstall.Any(m => m.identifier == mod.identifier))
.Where(m => m?.supports != null);
.Where(m => m?.supports != null)
.Except(recommendations.Keys)
.Except(suggestions.Keys);
// Find each module that "supports" something we're installing
foreach (CkanModule mod in candidates)
{
Expand Down Expand Up @@ -1361,8 +1363,7 @@ HashSet<CkanModule> toExclude
if (!registry.IsInstalled(provider.identifier)
&& !toExclude.Any(m => m.identifier == provider.identifier))
{
List<string> dependers;
if (dependersIndex.TryGetValue(provider, out dependers))
if (dependersIndex.TryGetValue(provider, out List<string> dependers))
{
// Add the dependent mod to the list of reasons this dependency is shown.
dependers.Add(mod.identifier);
Expand Down