Allow environment variable expansion in config files (#689)

* Allow environment variable expansion in config files

* Remove extra newline
This commit is contained in:
Josh 2023-02-26 04:45:57 -06:00 committed by GitHub
commit e3dcbe75e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,6 +165,9 @@ public abstract class ConfigurationBase<T> where T : class, new()
continue;
}
// Expand environment variables in strings. Format is windows-like (%ENV_NAME%)
if (propertyInfo.PropertyType == typeof(string)) value = Environment.ExpandEnvironmentVariables((string)value);
local.SetValue(this, value);
}
}