diff --git a/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs b/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs index fc61ae93ec..595ffdad37 100644 --- a/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs +++ b/src/chocolatey/infrastructure.app/nuget/NugetCommon.cs @@ -55,6 +55,16 @@ public static IPackageRepository GetLocalRepository(IPackagePathResolver pathRes public static IPackageRepository GetRemoteRepository(ChocolateyConfiguration configuration, ILogger nugetLogger, IPackageDownloader packageDownloader) { + packageDownloader.ProgressAvailable += (sender, e) => + { + // http://stackoverflow.com/a/888569/18475 + Console.Write("\rProgress: {0} {1}%".format_with(e.Operation, e.PercentComplete.to_string()).PadRight(Console.WindowWidth)); + if (e.PercentComplete == 100) + { + Console.WriteLine(""); + } + }; + IEnumerable sources = configuration.Sources.Split(new[] {";", ","}, StringSplitOptions.RemoveEmptyEntries); IList repositories = new List();