Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Init credentials (#3)
Browse files Browse the repository at this point in the history
* Initialize NuGet's Credential Service

* Rebased and switched to the expected Logger (#2)

* 📦 Automatic update of NUnit3TestAdapter to 3.15.1 (NuKeeperDotNet#869)

* 📦 Automatic update of SimpleInjector to 4.7.1 (NuKeeperDotNet#870)

* 📦 Automatic update of LibGit2Sharp to 0.26.1 (NuKeeperDotNet#874)

* Automatic update of NuGet.CommandLine to 5.2.0 (NuKeeperDotNet#875)

* 📦 Automatic update of NuGet.CommandLine to 5.2.0

* Bump the packaged NuGet version

* 📦 Automatic update of Octokit to 0.34.0 (NuKeeperDotNet#880)

* FxCopAnalyzers already pulls in other analyzers (NuKeeperDotNet#883)

* Automatic update of Microsoft.NET.Test.Sdk to 16.3.0 (NuKeeperDotNet#884)

* 📦 Automatic update of Microsoft.NET.Test.Sdk to 16.3.0

* Fix mismatched test project target framework

* Automatic update of coverlet.msbuild to 2.7.0 (NuKeeperDotNet#885)

* 📦 Automatic update of coverlet.msbuild to 2.7.0

* Remove duplicate coverlet privateassets node

* 📦 Automatic update of NuGet.Protocol to 5.3.0 (NuKeeperDotNet#886)

* 📦 Automatic update of System.Text.Encoding.CodePages to 4.6.0 (NuKeeperDotNet#887)

* 📦 Automatic update of McMaster.Extensions.CommandLineUtils to 2.4.2 (NuKeeperDotNet#888)

* 📦 Automatic update of Octokit to 0.36.0 (NuKeeperDotNet#890)

* Initialize NuGet's Credential Service

* Switch to nuget logger
  • Loading branch information
ransagy committed Oct 27, 2019
1 parent ae166e6 commit 5e37a72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions NuKeeper.Tests/Local/LocalEngineTests.cs
Expand Up @@ -90,10 +90,12 @@ private static LocalEngine MakeLocalEngine(IUpdateFinder finder, ILocalUpdater u

var logger = Substitute.For<INuKeeperLogger>();

var reporter = Substitute.For<IReporter>();
var nugetLogger = Substitute.For<NuGet.Common.ILogger>();

var reporter = Substitute.For<IReporter>();

var engine = new LocalEngine(reader, finder, sorter, updater,
reporter, logger);
reporter, logger, nugetLogger);
Assert.That(engine, Is.Not.Null);
return engine;
}
Expand Down
8 changes: 6 additions & 2 deletions NuKeeper/Local/LocalEngine.cs
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using NuGet.Common;
using NuGet.Credentials;
using NuKeeper.Abstractions.Configuration;
using NuKeeper.Abstractions.Inspections.Files;
Expand All @@ -25,26 +26,29 @@ public class LocalEngine : ILocalEngine
private readonly ILocalUpdater _updater;
private readonly IReporter _reporter;
private readonly INuKeeperLogger _logger;
private readonly ILogger _nugetLogger;

public LocalEngine(
INuGetSourcesReader nuGetSourcesReader,
IUpdateFinder updateFinder,
IPackageUpdateSetSort sorter,
ILocalUpdater updater,
IReporter reporter,
INuKeeperLogger logger)
INuKeeperLogger logger,
ILogger nugetLogger)
{
_nuGetSourcesReader = nuGetSourcesReader;
_updateFinder = updateFinder;
_sorter = sorter;
_updater = updater;
_reporter = reporter;
_logger = logger;
_nugetLogger = nugetLogger;
}

public async Task Run(SettingsContainer settings, bool write)
{
DefaultCredentialServiceUtility.SetupDefaultCredentialService(new NuGet.Common.NullLogger(), true);
DefaultCredentialServiceUtility.SetupDefaultCredentialService(_nugetLogger, true);

var folder = TargetFolder(settings.UserSettings);

Expand Down

0 comments on commit 5e37a72

Please sign in to comment.