fix: create directory if not exist
This commit is contained in:
parent
098fca5df8
commit
2041a187e7
@ -61,8 +61,12 @@ public static class EnvironmentConfiguration
|
||||
result.AddInMemoryCollection(LoadEnvironment(".env.develop")!);
|
||||
#endif
|
||||
|
||||
if (variablesFromFile.TryGetValue("PATH_TO_SAVE", out var data))
|
||||
Environment.SetEnvironmentVariable("PATH_TO_SAVE", variablesFromFile["PATH_TO_SAVE"]);
|
||||
if (!variablesFromFile.TryGetValue("PATH_TO_SAVE", out var data))
|
||||
return result.Build();
|
||||
|
||||
Environment.SetEnvironmentVariable("PATH_TO_SAVE", data);
|
||||
if (!Directory.Exists(data))
|
||||
Directory.CreateDirectory(data);
|
||||
|
||||
return result.Build();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user