From dcb144537760d3be612cd42dbe6644a4062915d4 Mon Sep 17 00:00:00 2001 From: Jeroen Landheer Date: Sun, 5 Apr 2020 21:15:43 +0200 Subject: [PATCH] Let environment variables overwrite configuration file settings in case of ambiguity --- src/BaGet/Extensions/IHostBuilderExtensions.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/BaGet/Extensions/IHostBuilderExtensions.cs b/src/BaGet/Extensions/IHostBuilderExtensions.cs index d49d33a1e..a6dea2f38 100644 --- a/src/BaGet/Extensions/IHostBuilderExtensions.cs +++ b/src/BaGet/Extensions/IHostBuilderExtensions.cs @@ -12,11 +12,10 @@ public static IHostBuilder ConfigureBaGetConfiguration(this IHostBuilder builder { return builder.ConfigureAppConfiguration((context, config) => { - config.AddEnvironmentVariables(); - config .SetBasePath(Environment.CurrentDirectory) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .AddEnvironmentVariables(); if (args != null) {