Skip to content

Commit

Permalink
Show warning for skipped sources
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 22, 2023
1 parent 14db42d commit 50ea910
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/NuPU/UpdateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,17 @@ public override async Task<int> ExecuteAsync(CommandContext context, UpdateComma
catch { }
}

if (showUpToDate) AnsiConsole.MarkupLine(UpToDate);

// If we had any unauthenticated sources we remove them to avoid requesting them for the next package.
foreach (var sourceToDelete in sourcesToDelete)
{
if (enabledSources.Contains(sourceToDelete)) enabledSources.Remove(sourceToDelete);
if (enabledSources.Contains(sourceToDelete))
{
AnsiConsole.MarkupLine($"[yellow]Unauthenticated source '{sourceToDelete.Name}'. Skipping further requests on this source.[/]");
enabledSources.Remove(sourceToDelete);
}
}

if (showUpToDate) AnsiConsole.MarkupLine(UpToDate);
}
}

Expand Down

0 comments on commit 50ea910

Please sign in to comment.