@@ -182,13 +182,14 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime)
182
182
var configurationService = DotNetConfigurationFactory . Create ( ) ;
183
183
var environmentProvider = new ConfigurationBasedEnvironmentProvider ( configurationService ) ;
184
184
185
- bool generateAspNetCertificate = environmentProvider . GetEnvironmentVariableAsBool ( EnvironmentVariableNames . DOTNET_GENERATE_ASPNET_CERTIFICATE , defaultValue : true ) ;
186
- bool telemetryOptout = environmentProvider . GetEnvironmentVariableAsBool ( EnvironmentVariableNames . TELEMETRY_OPTOUT , defaultValue : CompileOptions . TelemetryOptOutDefault ) ;
187
- bool addGlobalToolsToPath = environmentProvider . GetEnvironmentVariableAsBool ( EnvironmentVariableNames . DOTNET_ADD_GLOBAL_TOOLS_TO_PATH , defaultValue : true ) ;
188
- bool nologo = environmentProvider . GetEnvironmentVariableAsBool ( EnvironmentVariableNames . DOTNET_NOLOGO , defaultValue : false ) ;
189
- bool skipWorkloadIntegrityCheck = environmentProvider . GetEnvironmentVariableAsBool ( EnvironmentVariableNames . DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK ,
185
+ // Use typed configuration directly instead of environment variable calls
186
+ bool generateAspNetCertificate = configurationService . FirstTimeUse . GenerateAspNetCertificate ;
187
+ bool telemetryOptout = configurationService . CliUserExperience . TelemetryOptOut ;
188
+ bool addGlobalToolsToPath = configurationService . FirstTimeUse . AddGlobalToolsToPath ;
189
+ bool nologo = configurationService . CliUserExperience . NoLogo ;
190
+ bool skipWorkloadIntegrityCheck = configurationService . Workload . SkipIntegrityCheck ||
190
191
// Default the workload integrity check skip to true if the command is being ran in CI. Otherwise, false.
191
- defaultValue : new CIEnvironmentDetectorForTelemetry ( ) . IsCIEnvironment ( ) ) ;
192
+ new CIEnvironmentDetectorForTelemetry ( ) . IsCIEnvironment ( ) ;
192
193
193
194
ReportDotnetHomeUsage ( environmentProvider ) ;
194
195
0 commit comments