mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
fix(dotenv): skip empty lines and comments when loading environment variables
This commit is contained in:
@@ -12,6 +12,8 @@ namespace SharpbinV3.Server
|
||||
|
||||
foreach (var line in File.ReadAllLines(filePath))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line) || line.StartsWith("#"))
|
||||
continue;
|
||||
var parts = line.Split('=', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (parts.Length != 2)
|
||||
|
||||
Reference in New Issue
Block a user