A .NET library to load environment variables from .env files
Revert the change from Directory.GetCurrentDirectory()
to AppContext,BaseDirectory
as it broke existing applications
DO NOT USE -- the change in directory did in fact break behavior for at least one existing application. Move to 2.5.0
Directory.GetCurrentDirectory()
with just AppContext.BaseDirectory
-- which should do the same thing, except make things better for some cases, per #69Adds a new EnvReader helper class #65
Allow dash and period in env var identifiers
Properly handle dollar signs in values
https://www.nuget.org/packages/DotNetEnv/2.1.0
Technically this includes 2 breaking changes, but it is highly unlikely anyone is using them, and the changes are clear improvements.
Again, note that this changes the behavior of unquoted values in a noticeable way -- but before this would have been a parse error, so this simply makes it more flexible than it used to be.
This version has many breaking changes! Most of them will probably not bite you, but you should test.
${ENVVAR}
form in addition to $ENVVAR
export
(and other such env var setting commands) to allow for .env files to be directly source-d in a terminalrequireEnvFile
arg from LoadOptions
and make env file permanently not requiredLoad
overloads with parameterized arguments (instead of LoadOptions
object)Updated the way that the license is referenced in the csproj so as to appease new nuget rules for such things...