Skip to content

Commit

Permalink
Refine installer
Browse files Browse the repository at this point in the history
  • Loading branch information
sailro committed Apr 24, 2024
1 parent 5285967 commit 2f921c7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Installer/InstallCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public override async Task<int> ExecuteAsync(CommandContext commandContext, Sett
if (compilation == null && files.Length != 0 && files.All(file => folders.Any(folder => file!.StartsWith(folder))))
{
// Failure, retry by removing faulting features if possible
AnsiConsole.MarkupLine($"[yellow]Trying to disable faulting feature/command: [red]{GetFaultingNames(files)}[/].[/]");
AnsiConsole.MarkupLine($"[yellow]Trying to disable faulting feature/command: [red]{GetFaultingNames(files!)}[/].[/]");

context.Exclude = [.. files!, .. settings.DisabledFeatures!, .. settings.DisabledCommands!];
context.Branch = GetFallbackBranch(settings);
Expand All @@ -183,9 +183,13 @@ public override async Task<int> ExecuteAsync(CommandContext commandContext, Sett
return (compilation, archive);
}

private static string GetFaultingNames(string?[] files)
private static string GetFaultingNames(string[] files)
{
return string.Join(", ", files.Select(Path.GetFileNameWithoutExtension));
return string.Join(", ", files
.Select(Path.GetFileNameWithoutExtension)
.Where(f => !f!.StartsWith("Base"))
.Distinct()
.OrderBy(f => f));
}

private static string GetDefaultBranch()
Expand Down

0 comments on commit 2f921c7

Please sign in to comment.