fix: try get value
Some checks failed
Build and Deploy Docker Container / build-and-deploy (push) Has been cancelled
.NET Test Pipeline / build-and-test (push) Has been cancelled

Signed-off-by: Polianin Nikita <wesser@noreply.git.winsomnia.net>
This commit is contained in:
Polianin Nikita 2024-07-03 10:09:50 +03:00
parent 7e82d4a520
commit 2f7c77e764

View File

@ -61,7 +61,8 @@ public static class EnvironmentConfiguration
result.AddInMemoryCollection(LoadEnvironment(".env.develop")!); result.AddInMemoryCollection(LoadEnvironment(".env.develop")!);
#endif #endif
Environment.SetEnvironmentVariable("PATH_TO_SAVE", variablesFromFile["PATH_TO_SAVE"]); if (variablesFromFile.TryGetValue("PATH_TO_SAVE", out var data))
Environment.SetEnvironmentVariable("PATH_TO_SAVE", variablesFromFile["PATH_TO_SAVE"]);
return result.Build(); return result.Build();
} }