From 69e78f48d829a48672e42423686c9d826f7aa7d8 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 3 Jan 2025 23:42:00 +0100 Subject: Load environment variables also from system --- Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 79ed13b..8c2e1bf 100644 --- a/Program.cs +++ b/Program.cs @@ -1,8 +1,11 @@ -using System.Diagnostics; +using System.Collections; +using System.Diagnostics; using dotenv.net; DotEnv.Load(); var envVars = DotEnv.Read(); +foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables()) + envVars[entry.Key.ToString()!] = entry.Value!.ToString()!; while (true) { -- cgit v1.2.3