Prevent the ASP.NET certificate generation logic from running on the installers

This commit is contained in:
Javier Calvarro Nelson 2018-01-09 23:10:59 -08:00
parent 3f70aa89b1
commit 08a369cf86
3 changed files with 71 additions and 2 deletions

View file

@ -92,6 +92,7 @@ namespace Microsoft.DotNet.Cli
new FirstTimeUseNoticeSentinel(cliFallbackFolderPathCalculator))
{
IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel = disposableFirstTimeUseNoticeSentinel;
IAspNetCertificateSentinel aspNetCertificateSentinel = new AspNetCertificateSentinel(cliFallbackFolderPathCalculator);
for (; lastArg < args.Length; lastArg++)
{
if (IsArg(args[lastArg], "d", "diagnostics"))
@ -134,6 +135,7 @@ namespace Microsoft.DotNet.Cli
var hasSuperUserAccess = false;
if (IsDotnetBeingInvokedFromNativeInstaller(topLevelCommandParserResult))
{
aspNetCertificateSentinel = new NoOpAspNetCertificateSentinel();
firstTimeUseNoticeSentinel = new NoOpFirstTimeUseNoticeSentinel();
hasSuperUserAccess = true;
}
@ -141,7 +143,7 @@ namespace Microsoft.DotNet.Cli
ConfigureDotNetForFirstTimeUse(
nugetCacheSentinel,
firstTimeUseNoticeSentinel,
new AspNetCertificateSentinel(cliFallbackFolderPathCalculator),
aspNetCertificateSentinel,
cliFallbackFolderPathCalculator,
hasSuperUserAccess);