Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables not placed into real environment variables #6

Open
mikko-tribo opened this issue Nov 29, 2022 · 0 comments
Open

Variables not placed into real environment variables #6

mikko-tribo opened this issue Nov 29, 2022 · 0 comments

Comments

@mikko-tribo
Copy link

mikko-tribo commented Nov 29, 2022

Heya,

thanks for this nifty package, has been pretty helpful so far for easy machine-specific configurations.

One issue I encountered was that this package does not actually place the .env variables into the real environment variable container. This can be problematic in a context where I have some variables I want to set with real env vars on remote machines (through something like docker compose) and locally using .env file, but then I'd have to read the real storage as well as this package's custom storage.

This is the workaround I currently use, but maybe something similar could be in the ParseEnvironmentFile function?

var envDict = env.variables;
foreach (var envVar in envDict)
{
      Environment.SetEnvironmentVariable(envVar.Key, envVar.Value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant