/// <summary> /// Reports any pending reboots. /// </summary> private void ReportPendingReboot() { if (RebootPending) { ReportOnce(AnsiColorExtensions.Yellow(LocalizableStrings.PendingReboot)); } }
static async Task Main(string[] args) { try { var(usePrerelease, path) = ParseArguments(args); var settings = Settings.LoadDefaultSettings(Path.GetDirectoryName(path)); var packageSourceProvider = new PackageSourceProvider(settings); var packageSources = packageSourceProvider.LoadPackageSources(); var resourceProviders = Repository.Provider.GetCoreV3(); var repositories = packageSources.Select(ps => Repository.CreateSource(resourceProviders, ps)).ToList(); foreach (var reference in await GetNuGetReferences(path)) { await GetAvailableVersions(reference.PackageId, reference.Version, usePrerelease, repositories); } } catch (GracefulException gex) { var errorConsole = Microsoft.DotNet.Cli.Utils.AnsiConsole.GetError(); errorConsole.WriteLine(AnsiColorExtensions.Red(gex.Message)); } catch (Exception ex) { Console.WriteLine(ex); } }