aboutsummaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-01-03 23:42:00 +0100
committerTim <contact@bytim.eu>2025-01-03 23:42:00 +0100
commit69e78f48d829a48672e42423686c9d826f7aa7d8 (patch)
tree0a36bd6132efc439a2098e78510f4b61a0d51d35 /Program.cs
parentad66e2f3a9bb2c4d2a7566151d75986d459c4e5b (diff)
downloadGitAutoFetch-69e78f48d829a48672e42423686c9d826f7aa7d8.tar.xz
GitAutoFetch-69e78f48d829a48672e42423686c9d826f7aa7d8.zip
Load environment variables also from system
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs5
1 files changed, 4 insertions, 1 deletions
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)
{