-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the DOTNET_ env var prefix #1084
Conversation
Needs a test |
@@ -20,7 +20,7 @@ public static IHostBuilder CreateDefaultBuilder(string[] args) | |||
builder.UseContentRoot(Directory.GetCurrentDirectory()); | |||
builder.ConfigureHostConfiguration(config => | |||
{ | |||
config.AddEnvironmentVariables(); // TODO: Prefix? | |||
config.AddEnvironmentVariables("DOTNET_"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use a named variable for the prefix like we do everywhere else: https://github.com/aspnet/AspNetCore/blob/c458fe6ebe24ab94f098a453825e71207721b9b9/src/Hosting/Hosting/src/WebHostBuilder.cs#L44
@davidfowl reliably testing env vars needs out-of-proc functional testing. We don't have that infrastructure in Extensions and it isn't worth building for this. |
@Tratcher we need more than 0 coverage. I think it would be reasonable to write those tests in ASP.NET Core hosting since we do that the infrastructure on that side. |
Or part of the template I'm working on. |
dotnet/aspnetcore#4150
@glennc