fix: add test env to variablesFromFile
This commit is contained in:
parent
cdb738ca42
commit
57f4d1b822
@ -46,6 +46,10 @@ public static class EnvironmentConfiguration
|
||||
{
|
||||
var variablesFromFile = LoadEnvironment(".env");
|
||||
|
||||
#if DEBUG
|
||||
LoadEnvironment(".env.develop").ToList().ForEach(x => variablesFromFile.Add(x.Key, x.Value));
|
||||
#endif
|
||||
|
||||
var environmentVariables = Environment.GetEnvironmentVariables()
|
||||
.OfType<DictionaryEntry>()
|
||||
.ToDictionary(
|
||||
@ -57,9 +61,8 @@ public static class EnvironmentConfiguration
|
||||
.AddInMemoryCollection(environmentVariables!)
|
||||
.AddInMemoryCollection(variablesFromFile!);
|
||||
|
||||
#if DEBUG
|
||||
result.AddInMemoryCollection(LoadEnvironment(".env.develop")!);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
if (!variablesFromFile.TryGetValue("PATH_TO_SAVE", out var data))
|
||||
return result.Build();
|
||||
|
Loading…
Reference in New Issue
Block a user