Skip to content

Commit c7c570b

Browse files
committed
changed how we extract the db name from env var
1 parent 7484044 commit c7c570b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public Config()
1919
string key = envVar?.ToString() ?? "";
2020
if (key.StartsWith("DB_") && key.EndsWith("_USERNAME") && key.Length > 12)
2121
{
22-
var db = key.TrimStart("DB_").TrimEnd("_USERNAME");
22+
var db = key.Replace("DB_", "").Replace("_USERNAME", "");
2323
Console.WriteLine($"🧑‍💻 Found db {db}");
2424
var username = Environment.GetEnvironmentVariable($"DB_{db}_USERNAME");
2525
var password = Environment.GetEnvironmentVariable($"DB_{db}_PASSWORD");

0 commit comments

Comments
 (0)